diff options
author | hans@chromium.org <hans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-23 07:39:28 +0000 |
---|---|---|
committer | hans@chromium.org <hans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-23 07:39:28 +0000 |
commit | ddd1844a44696ec660bcbb6d939df0299a03b3a6 (patch) | |
tree | 374ae15c8c723deecbe8011209869720c6c0f62f /chrome/browser/device_orientation/orientation.h | |
parent | c9f57d3571e01d1be5b45d484174f9f8fabbd0ee (diff) | |
download | chromium_src-ddd1844a44696ec660bcbb6d939df0299a03b3a6.zip chromium_src-ddd1844a44696ec660bcbb6d939df0299a03b3a6.tar.gz chromium_src-ddd1844a44696ec660bcbb6d939df0299a03b3a6.tar.bz2 |
Implement device_orientation::Provider.
Provider provides its registered observers with device orientation data
by finding and polling a DataFetcher on a background thread.
BUG=44654
TEST=unit_tests --gtest_filter="DeviceOrientationProviderTest.*"
Review URL: http://codereview.chromium.org/3136008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57036 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/device_orientation/orientation.h')
-rw-r--r-- | chrome/browser/device_orientation/orientation.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/chrome/browser/device_orientation/orientation.h b/chrome/browser/device_orientation/orientation.h index d43a989..2193170 100644 --- a/chrome/browser/device_orientation/orientation.h +++ b/chrome/browser/device_orientation/orientation.h @@ -34,6 +34,12 @@ class Orientation { can_provide_gamma_(false) { } + static Orientation Empty() { return Orientation(); } + + bool IsEmpty() { + return !can_provide_alpha_ && !can_provide_beta_ && !can_provide_gamma_; + } + double alpha_; double beta_; double gamma_; |