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

Unified Diff: chrome/browser/device_orientation/orientation.h

Issue 2858049: Chromium plumbing for Device Orientation. (Closed)
Patch Set: Fixes after try bot runs 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/device_orientation/dispatcher_host.cc ('k') | chrome/browser/device_orientation/provider.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/device_orientation/orientation.h
diff --git a/chrome/browser/device_orientation/orientation.h b/chrome/browser/device_orientation/orientation.h
new file mode 100644
index 0000000000000000000000000000000000000000..d43a989b1a985a3fd675e9218292de335dfe17c9
--- /dev/null
+++ b/chrome/browser/device_orientation/orientation.h
@@ -0,0 +1,47 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_DEVICE_ORIENTATION_ORIENTATION_H_
+#define CHROME_BROWSER_DEVICE_ORIENTATION_ORIENTATION_H_
+
+namespace device_orientation {
+class Orientation {
+ public:
+ // alpha, beta and gamma are the rotations around the axes as specified in
+ // http://dev.w3.org/geo/api/spec-source-orientation.html
+ //
+ // can_provide_{alpha,beta,gamma} is true if data can be provided for that
+ // variable.
+
+ Orientation(bool can_provide_alpha, double alpha,
+ bool can_provide_beta, double beta,
+ bool can_provide_gamma, double gamma)
+ : alpha_(alpha),
+ beta_(beta),
+ gamma_(gamma),
+ can_provide_alpha_(can_provide_alpha),
+ can_provide_beta_(can_provide_beta),
+ can_provide_gamma_(can_provide_gamma) {
+ }
+
+ Orientation()
+ : alpha_(0),
+ beta_(0),
+ gamma_(0),
+ can_provide_alpha_(false),
+ can_provide_beta_(false),
+ can_provide_gamma_(false) {
+ }
+
+ double alpha_;
+ double beta_;
+ double gamma_;
+ bool can_provide_alpha_;
+ bool can_provide_beta_;
+ bool can_provide_gamma_;
+};
+
+} // namespace device_orientation
+
+#endif // CHROME_BROWSER_DEVICE_ORIENTATION_ORIENTATION_H_
« no previous file with comments | « chrome/browser/device_orientation/dispatcher_host.cc ('k') | chrome/browser/device_orientation/provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698