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

Side by Side Diff: Source/modules/screen_orientation/ScreenOrientationController.h

Issue 219463003: Screen Orientation API: cleanup, simplify and fix implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 8 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 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef ScreenOrientationController_h 5 #ifndef ScreenOrientationController_h
6 #define ScreenOrientationController_h 6 #define ScreenOrientationController_h
7 7
8 #include "core/dom/DocumentSupplementable.h" 8 #include "core/dom/DocumentSupplementable.h"
9 #include "public/platform/WebScreenOrientation.h" 9 #include "public/platform/WebScreenOrientationType.h"
10 10
11 namespace WebCore { 11 namespace WebCore {
12 12
13 class ScreenOrientationController FINAL : public DocumentSupplement { 13 class ScreenOrientationController FINAL : public DocumentSupplement {
14 public: 14 public:
15 virtual ~ScreenOrientationController(); 15 virtual ~ScreenOrientationController();
16 16
17 void didChangeScreenOrientation(blink::WebScreenOrientation); 17 void didChangeScreenOrientation(blink::WebScreenOrientationType);
18 18
19 blink::WebScreenOrientation orientation() const { return m_orientation; } 19 blink::WebScreenOrientationType orientation() const { return m_orientation; }
20 20
21 // DocumentSupplement API. 21 // DocumentSupplement API.
22 static ScreenOrientationController& from(Document&); 22 static ScreenOrientationController& from(Document&);
23 static const char* supplementName(); 23 static const char* supplementName();
24 24
25 virtual void trace(Visitor*) OVERRIDE { } 25 virtual void trace(Visitor*) OVERRIDE { }
26 26
27 private: 27 private:
28 explicit ScreenOrientationController(Document&); 28 explicit ScreenOrientationController(Document&);
29 29
30 void dispatchOrientationChangeEvent(); 30 void dispatchOrientationChangeEvent();
31 31
32 Document& m_document; 32 Document& m_document;
33 blink::WebScreenOrientation m_orientation; 33 blink::WebScreenOrientationType m_orientation;
34 }; 34 };
35 35
36 } // namespace WebCore 36 } // namespace WebCore
37 37
38 #endif // ScreenOrientationController_h 38 #endif // ScreenOrientationController_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698