Chromium Code Reviews| 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(); | |
|
abarth-chromium
2014/07/02 18:25:09
I wonder if we should pick a slightly different na
mlamouri (slow - plz ping)
2014/07/02 19:18:12
Removed createFake() entirely.
| |
| 19 | |
| 20 virtual ~OrientationInformation(); | |
|
abarth-chromium
2014/07/02 18:25:09
Why does this destructor need to be virtual?
mlamouri (slow - plz ping)
2014/07/02 19:18:11
Removed destructor.
| |
| 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; | |
|
abarth-chromium
2014/07/02 18:25:10
Please don't use friends. Just expose the functio
mlamouri (slow - plz ping)
2014/07/02 19:18:12
Done.
| |
| 31 | |
| 32 OrientationInformation(); | |
| 33 OrientationInformation(const OrientationInformation&); | |
|
abarth-chromium
2014/07/02 18:25:09
It's unusual to have a copy constructor for a DOM
mlamouri (slow - plz ping)
2014/07/02 19:18:11
Done.
| |
| 34 bool operator==(const OrientationInformation&); | |
| 35 bool operator!=(const OrientationInformation&); | |
|
abarth-chromium
2014/07/02 18:25:09
These are also unusual. Maybe an |equals| functio
mlamouri (slow - plz ping)
2014/07/02 19:18:12
Done.
| |
| 36 | |
| 37 void setType(blink::WebScreenOrientationType); | |
| 38 void setAngle(unsigned short); | |
|
abarth-chromium
2014/07/02 18:25:09
You can just make these public.
mlamouri (slow - plz ping)
2014/07/02 19:18:11
Done.
| |
| 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 |