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

Side by Side Diff: third_party/WebKit/Source/modules/device_orientation/DeviceOrientationData.h

Issue 2885203004: Refactor content/renderer/device_sensors to use device/generic_sensor instead of device/sensors (Closed)
Patch Set: updated content/renderer/BUILD.gn Created 3 years, 7 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 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * * Redistributions of source code must retain the above copyright 7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright 9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 11 matching lines...) Expand all
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */ 24 */
25 25
26 #ifndef DeviceOrientationData_h 26 #ifndef DeviceOrientationData_h
27 #define DeviceOrientationData_h 27 #define DeviceOrientationData_h
28 28
29 #include "bindings/core/v8/Nullable.h" 29 #include "bindings/core/v8/Nullable.h"
30 #include "platform/heap/Handle.h" 30 #include "platform/heap/Handle.h"
31 31
32 namespace device {
33 class OrientationData;
34 }
35
36 namespace blink { 32 namespace blink {
37 33
38 class DeviceOrientationEventInit; 34 class DeviceOrientationEventInit;
35 class WebDeviceOrientationData;
39 36
40 class DeviceOrientationData final 37 class DeviceOrientationData final
41 : public GarbageCollected<DeviceOrientationData> { 38 : public GarbageCollected<DeviceOrientationData> {
42 public: 39 public:
43 static DeviceOrientationData* Create(); 40 static DeviceOrientationData* Create();
44 static DeviceOrientationData* Create(const Nullable<double>& alpha, 41 static DeviceOrientationData* Create(const Nullable<double>& alpha,
45 const Nullable<double>& beta, 42 const Nullable<double>& beta,
46 const Nullable<double>& gamma, 43 const Nullable<double>& gamma,
47 bool absolute); 44 bool absolute);
48 static DeviceOrientationData* Create(const DeviceOrientationEventInit&); 45 static DeviceOrientationData* Create(const DeviceOrientationEventInit&);
49 static DeviceOrientationData* Create(const device::OrientationData&); 46 static DeviceOrientationData* Create(const WebDeviceOrientationData&);
50 DEFINE_INLINE_TRACE() {} 47 DEFINE_INLINE_TRACE() {}
51 48
52 double Alpha() const; 49 double Alpha() const;
53 double Beta() const; 50 double Beta() const;
54 double Gamma() const; 51 double Gamma() const;
55 bool Absolute() const; 52 bool Absolute() const;
56 bool CanProvideAlpha() const; 53 bool CanProvideAlpha() const;
57 bool CanProvideBeta() const; 54 bool CanProvideBeta() const;
58 bool CanProvideGamma() const; 55 bool CanProvideGamma() const;
59 56
60 bool CanProvideEventData() const; 57 bool CanProvideEventData() const;
61 58
62 private: 59 private:
63 DeviceOrientationData(); 60 DeviceOrientationData();
64 DeviceOrientationData(const Nullable<double>& alpha, 61 DeviceOrientationData(const Nullable<double>& alpha,
65 const Nullable<double>& beta, 62 const Nullable<double>& beta,
66 const Nullable<double>& gamma, 63 const Nullable<double>& gamma,
67 bool absolute); 64 bool absolute);
68 65
69 Nullable<double> alpha_; 66 Nullable<double> alpha_;
70 Nullable<double> beta_; 67 Nullable<double> beta_;
71 Nullable<double> gamma_; 68 Nullable<double> gamma_;
72 bool absolute_; 69 bool absolute_;
73 }; 70 };
74 71
75 } // namespace blink 72 } // namespace blink
76 73
77 #endif // DeviceOrientationData_h 74 #endif // DeviceOrientationData_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698