From e659b4bee3ac8351072862af9c9fda5d90239750 Mon Sep 17 00:00:00 2001 From: "yiyaoliu@chromium.org" Date: Thu, 7 Nov 2013 21:52:05 +0000 Subject: Add cross-platform API to get the form factor of the device This API returns whether the device is a phone or a tablet for Android and iOS (for other platforms, it always returns the device as being desktop). The new API is placed in //ui rather than //chrome in order to make it accessible to components. BUG=312903 Review URL: https://codereview.chromium.org/50603005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@233697 0039d316-1c4b-4281-b951-d872f2087c98 --- ui/ui.gyp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'ui/ui.gyp') diff --git a/ui/ui.gyp b/ui/ui.gyp index b167374..d0b75cd 100644 --- a/ui/ui.gyp +++ b/ui/ui.gyp @@ -141,6 +141,10 @@ 'base/default_theme_provider.cc', 'base/default_theme_provider.h', 'base/default_theme_provider_mac.mm', + 'base/device_form_factor_android.cc', + 'base/device_form_factor_desktop.cc', + 'base/device_form_factor_ios.mm', + 'base/device_form_factor.h', 'base/dragdrop/cocoa_dnd_util.h', 'base/dragdrop/cocoa_dnd_util.mm', 'base/dragdrop/drag_drop_types.h', @@ -568,6 +572,11 @@ 'ui_java', ], }], + ['OS=="android" or OS=="ios"', { + 'sources!': [ + 'base/device_form_factor_desktop.cc' + ], + }], ['OS=="linux"', { 'libraries': [ '-ldl', -- cgit v1.1