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

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

Issue 1089523002: ScreenOrientationController: task-based dispatching of change events. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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/frame/LocalFrameLifecycleObserver.h" 8 #include "core/frame/LocalFrameLifecycleObserver.h"
9 #include "core/frame/PlatformEventController.h" 9 #include "core/frame/PlatformEventController.h"
10 #include "platform/Supplementable.h" 10 #include "platform/Supplementable.h"
11 #include "platform/Timer.h"
12 #include "public/platform/WebLockOrientationCallback.h" 11 #include "public/platform/WebLockOrientationCallback.h"
13 #include "public/platform/WebScreenOrientationLockType.h" 12 #include "public/platform/WebScreenOrientationLockType.h"
14 #include "public/platform/WebScreenOrientationType.h" 13 #include "public/platform/WebScreenOrientationType.h"
15 14
16 namespace blink { 15 namespace blink {
17 16
18 class FrameView; 17 class FrameView;
19 class ScreenOrientation; 18 class ScreenOrientation;
20 class WebScreenOrientationClient; 19 class WebScreenOrientationClient;
21 20
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 virtual bool hasLastData() override; 52 virtual bool hasLastData() override;
54 virtual void pageVisibilityChanged() override; 53 virtual void pageVisibilityChanged() override;
55 54
56 // Inherited from LocalFrameLifecycleObserver. 55 // Inherited from LocalFrameLifecycleObserver.
57 virtual void willDetachFrameHost() override; 56 virtual void willDetachFrameHost() override;
58 57
59 void notifyDispatcher(); 58 void notifyDispatcher();
60 59
61 void updateOrientation(); 60 void updateOrientation();
62 61
63 void dispatchEventTimerFired(Timer<ScreenOrientationController>*); 62 void dispatchChangeEvent();
64 63
65 bool isActiveAndVisible() const; 64 bool isActiveAndVisible() const;
66 65
67 PersistentWillBeMember<ScreenOrientation> m_orientation; 66 PersistentWillBeMember<ScreenOrientation> m_orientation;
68 WebScreenOrientationClient* m_client; 67 WebScreenOrientationClient* m_client;
69 Timer<ScreenOrientationController> m_dispatchEventTimer; 68 bool m_isDispatchingEvent;
70 }; 69 };
71 70
72 } // namespace blink 71 } // namespace blink
73 72
74 #endif // ScreenOrientationController_h 73 #endif // ScreenOrientationController_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698