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

Side by Side 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 unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_DEVICE_ORIENTATION_ORIENTATION_H_
6 #define CHROME_BROWSER_DEVICE_ORIENTATION_ORIENTATION_H_
7
8 namespace device_orientation {
9 class Orientation {
10 public:
11 // alpha, beta and gamma are the rotations around the axes as specified in
12 // http://dev.w3.org/geo/api/spec-source-orientation.html
13 //
14 // can_provide_{alpha,beta,gamma} is true if data can be provided for that
15 // variable.
16
17 Orientation(bool can_provide_alpha, double alpha,
18 bool can_provide_beta, double beta,
19 bool can_provide_gamma, double gamma)
20 : alpha_(alpha),
21 beta_(beta),
22 gamma_(gamma),
23 can_provide_alpha_(can_provide_alpha),
24 can_provide_beta_(can_provide_beta),
25 can_provide_gamma_(can_provide_gamma) {
26 }
27
28 Orientation()
29 : alpha_(0),
30 beta_(0),
31 gamma_(0),
32 can_provide_alpha_(false),
33 can_provide_beta_(false),
34 can_provide_gamma_(false) {
35 }
36
37 double alpha_;
38 double beta_;
39 double gamma_;
40 bool can_provide_alpha_;
41 bool can_provide_beta_;
42 bool can_provide_gamma_;
43 };
44
45 } // namespace device_orientation
46
47 #endif // CHROME_BROWSER_DEVICE_ORIENTATION_ORIENTATION_H_
OLDNEW
« 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