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

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

Issue 647933003: Disconnect from WebScreenOrientationClient when frame is detached. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « no previous file | Source/modules/screen_orientation/ScreenOrientationController.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/FrameDestructionObserver.h" 8 #include "core/frame/FrameDestructionObserver.h"
9 #include "core/frame/PlatformEventController.h" 9 #include "core/frame/PlatformEventController.h"
10 #include "platform/Supplementable.h" 10 #include "platform/Supplementable.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 explicit ScreenOrientationController(LocalFrame&, WebScreenOrientationClient *); 45 explicit ScreenOrientationController(LocalFrame&, WebScreenOrientationClient *);
46 static WebScreenOrientationType computeOrientation(FrameView*); 46 static WebScreenOrientationType computeOrientation(FrameView*);
47 47
48 // Inherited from PlatformEventController. 48 // Inherited from PlatformEventController.
49 virtual void didUpdateData() override; 49 virtual void didUpdateData() override;
50 virtual void registerWithDispatcher() override; 50 virtual void registerWithDispatcher() override;
51 virtual void unregisterWithDispatcher() override; 51 virtual void unregisterWithDispatcher() override;
52 virtual bool hasLastData() override; 52 virtual bool hasLastData() override;
53 virtual void pageVisibilityChanged() override; 53 virtual void pageVisibilityChanged() override;
54 54
55 // Inherited from FrameDestructionObserver.
56 virtual void willDetachFrameHost() override;
57
55 void notifyDispatcher(); 58 void notifyDispatcher();
56 59
57 void updateOrientation(); 60 void updateOrientation();
58 61
59 void dispatchEventTimerFired(Timer<ScreenOrientationController>*); 62 void dispatchEventTimerFired(Timer<ScreenOrientationController>*);
60 63
61 bool isActiveAndVisible() const; 64 bool isActiveAndVisible() const;
62 65
63 PersistentWillBeMember<ScreenOrientation> m_orientation; 66 PersistentWillBeMember<ScreenOrientation> m_orientation;
64 WebScreenOrientationClient* m_client; 67 WebScreenOrientationClient* m_client;
65 Timer<ScreenOrientationController> m_dispatchEventTimer; 68 Timer<ScreenOrientationController> m_dispatchEventTimer;
66 }; 69 };
67 70
68 } // namespace blink 71 } // namespace blink
69 72
70 #endif // ScreenOrientationController_h 73 #endif // ScreenOrientationController_h
OLDNEW
« no previous file with comments | « no previous file | Source/modules/screen_orientation/ScreenOrientationController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698