Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(701)

Side by Side Diff: chrome/browser/device_orientation/orientation.h

Issue 3136008: Implement device_orientation::Provider. (Closed)
Patch Set: Patch Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_DEVICE_ORIENTATION_ORIENTATION_H_ 5 #ifndef CHROME_BROWSER_DEVICE_ORIENTATION_ORIENTATION_H_
6 #define CHROME_BROWSER_DEVICE_ORIENTATION_ORIENTATION_H_ 6 #define CHROME_BROWSER_DEVICE_ORIENTATION_ORIENTATION_H_
7 7
8 namespace device_orientation { 8 namespace device_orientation {
9 class Orientation { 9 class Orientation {
10 public: 10 public:
(...skipping 16 matching lines...) Expand all
27 27
28 Orientation() 28 Orientation()
29 : alpha_(0), 29 : alpha_(0),
30 beta_(0), 30 beta_(0),
31 gamma_(0), 31 gamma_(0),
32 can_provide_alpha_(false), 32 can_provide_alpha_(false),
33 can_provide_beta_(false), 33 can_provide_beta_(false),
34 can_provide_gamma_(false) { 34 can_provide_gamma_(false) {
35 } 35 }
36 36
37 static Orientation Empty() { return Orientation(); }
38
39 bool IsEmpty() {
40 return !can_provide_alpha_ && !can_provide_beta_ && !can_provide_gamma_;
41 }
42
37 double alpha_; 43 double alpha_;
38 double beta_; 44 double beta_;
39 double gamma_; 45 double gamma_;
40 bool can_provide_alpha_; 46 bool can_provide_alpha_;
41 bool can_provide_beta_; 47 bool can_provide_beta_;
42 bool can_provide_gamma_; 48 bool can_provide_gamma_;
43 }; 49 };
44 50
45 } // namespace device_orientation 51 } // namespace device_orientation
46 52
47 #endif // CHROME_BROWSER_DEVICE_ORIENTATION_ORIENTATION_H_ 53 #endif // CHROME_BROWSER_DEVICE_ORIENTATION_ORIENTATION_H_
OLDNEW
« no previous file with comments | « chrome/browser/device_orientation/data_fetcher.h ('k') | chrome/browser/device_orientation/provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698