OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 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 OrientationInformation_h |
| 6 #define OrientationInformation_h |
| 7 |
| 8 #include "bindings/core/v8/ScriptWrappable.h" |
| 9 #include "public/platform/WebScreenOrientationType.h" |
| 10 |
| 11 namespace WebCore { |
| 12 |
| 13 class OrientationInformation FINAL |
| 14 : public GarbageCollectedFinalized<OrientationInformation> |
| 15 , public ScriptWrappable { |
| 16 public: |
| 17 // Returns an OrientationInformation instance filed with fake values. |
| 18 static OrientationInformation* createFake(); |
| 19 |
| 20 virtual ~OrientationInformation(); |
| 21 |
| 22 bool initialized() const; |
| 23 |
| 24 String type() const; |
| 25 unsigned short angle() const; |
| 26 |
| 27 void trace(Visitor*) { } |
| 28 |
| 29 protected: |
| 30 friend class ScreenOrientationController; |
| 31 |
| 32 OrientationInformation(); |
| 33 OrientationInformation(const OrientationInformation&); |
| 34 bool operator==(const OrientationInformation&); |
| 35 bool operator!=(const OrientationInformation&); |
| 36 |
| 37 void setType(blink::WebScreenOrientationType); |
| 38 void setAngle(unsigned short); |
| 39 |
| 40 private: |
| 41 blink::WebScreenOrientationType m_type; |
| 42 unsigned short m_angle; |
| 43 }; |
| 44 |
| 45 } // namespace WebCore |
| 46 |
| 47 #endif // OrientationInformation_h |
OLD | NEW |