device_form_factor.h 687 B

123456789101112131415161718192021222324
  1. // Copyright 2013 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef UI_BASE_DEVICE_FORM_FACTOR_H_
  5. #define UI_BASE_DEVICE_FORM_FACTOR_H_
  6. #include "base/component_export.h"
  7. namespace ui {
  8. enum DeviceFormFactor {
  9. DEVICE_FORM_FACTOR_DESKTOP = 0,
  10. DEVICE_FORM_FACTOR_PHONE = 1,
  11. DEVICE_FORM_FACTOR_TABLET = 2
  12. };
  13. // Returns the form factor of current device. For platforms other than Android
  14. // and iOS, DEVICE_FORM_FACTOR_DESKTOP is always returned.
  15. COMPONENT_EXPORT(UI_BASE) DeviceFormFactor GetDeviceFormFactor();
  16. } // namespace ui
  17. #endif // UI_BASE_DEVICE_FORM_FACTOR_H_