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

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

Issue 1190293002: Have ScreenOrientationController use a timer for async event dispatch again (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: add clarifying comment to test Created 5 years, 6 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 "modules/ModulesExport.h" 10 #include "modules/ModulesExport.h"
11 #include "platform/Supplementable.h" 11 #include "platform/Supplementable.h"
12 #include "platform/Timer.h"
12 #include "public/platform/modules/screen_orientation/WebLockOrientationCallback. h" 13 #include "public/platform/modules/screen_orientation/WebLockOrientationCallback. h"
13 #include "public/platform/modules/screen_orientation/WebScreenOrientationLockTyp e.h" 14 #include "public/platform/modules/screen_orientation/WebScreenOrientationLockTyp e.h"
14 #include "public/platform/modules/screen_orientation/WebScreenOrientationType.h" 15 #include "public/platform/modules/screen_orientation/WebScreenOrientationType.h"
15 16
16 namespace blink { 17 namespace blink {
17 18
18 class FrameView; 19 class FrameView;
19 class ScreenOrientation; 20 class ScreenOrientation;
20 class WebScreenOrientationClient; 21 class WebScreenOrientationClient;
21 22
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 virtual bool hasLastData() override; 54 virtual bool hasLastData() override;
54 virtual void pageVisibilityChanged() override; 55 virtual void pageVisibilityChanged() override;
55 56
56 // Inherited from LocalFrameLifecycleObserver. 57 // Inherited from LocalFrameLifecycleObserver.
57 virtual void willDetachFrameHost() override; 58 virtual void willDetachFrameHost() override;
58 59
59 void notifyDispatcher(); 60 void notifyDispatcher();
60 61
61 void updateOrientation(); 62 void updateOrientation();
62 63
63 void dispatchChangeEvent(); 64 void dispatchEventTimerFired(Timer<ScreenOrientationController>*);
64 65
65 bool isActiveAndVisible() const; 66 bool isActiveAndVisible() const;
66 67
67 PersistentWillBeMember<ScreenOrientation> m_orientation; 68 PersistentWillBeMember<ScreenOrientation> m_orientation;
68 WebScreenOrientationClient* m_client; 69 WebScreenOrientationClient* m_client;
69 bool m_isDispatchingEvent; 70 Timer<ScreenOrientationController> m_dispatchEventTimer;
70 }; 71 };
71 72
72 } // namespace blink 73 } // namespace blink
73 74
74 #endif // ScreenOrientationController_h 75 #endif // ScreenOrientationController_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698