OLD | NEW |
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 18 matching lines...) Expand all Loading... |
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 blink { | 32 namespace blink { |
33 | 33 |
34 class WebDeviceOrientationData; | 34 class WebDeviceOrientationData; |
35 | 35 |
36 class DeviceOrientationData final : public GarbageCollected<DeviceOrientationDat
a> { | 36 class DeviceOrientationData final : public GarbageCollected<DeviceOrientationDat
a> { |
37 public: | 37 public: |
38 static DeviceOrientationData* create(); | 38 static DeviceOrientationData* create(); |
39 static DeviceOrientationData* create(const Nullable<double>& alpha, const Nu
llable<double>& beta, const Nullable<double>& gamma, const Nullable<bool>& absol
ute = false); | 39 static DeviceOrientationData* create(const Nullable<double>& alpha, const Nu
llable<double>& beta, const Nullable<double>& gamma, bool absolute); |
40 static DeviceOrientationData* create(const WebDeviceOrientationData&); | 40 static DeviceOrientationData* create(const WebDeviceOrientationData&); |
41 DEFINE_INLINE_TRACE() { } | 41 DEFINE_INLINE_TRACE() { } |
42 | 42 |
43 double alpha() const; | 43 double alpha() const; |
44 double beta() const; | 44 double beta() const; |
45 double gamma() const; | 45 double gamma() const; |
46 bool absolute() const; | 46 bool absolute() const; |
47 bool canProvideAlpha() const; | 47 bool canProvideAlpha() const; |
48 bool canProvideBeta() const; | 48 bool canProvideBeta() const; |
49 bool canProvideGamma() const; | 49 bool canProvideGamma() const; |
50 bool canProvideAbsolute() const; | |
51 | 50 |
52 bool canProvideEventData() const; | 51 bool canProvideEventData() const; |
53 | 52 |
54 private: | 53 private: |
55 DeviceOrientationData(); | 54 DeviceOrientationData(); |
56 DeviceOrientationData(const Nullable<double>& alpha, const Nullable<double>&
beta, const Nullable<double>& gamma, const Nullable<bool>& absolute); | 55 DeviceOrientationData(const Nullable<double>& alpha, const Nullable<double>&
beta, const Nullable<double>& gamma, bool absolute); |
57 | 56 |
58 Nullable<double> m_alpha; | 57 Nullable<double> m_alpha; |
59 Nullable<double> m_beta; | 58 Nullable<double> m_beta; |
60 Nullable<double> m_gamma; | 59 Nullable<double> m_gamma; |
61 Nullable<bool> m_absolute; | 60 bool m_absolute; |
62 }; | 61 }; |
63 | 62 |
64 } // namespace blink | 63 } // namespace blink |
65 | 64 |
66 #endif // DeviceOrientationData_h | 65 #endif // DeviceOrientationData_h |
OLD | NEW |