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

Side by Side Diff: Source/modules/presentation/PresentationController.cpp

Issue 1026253002: Rename FrameDestructionObserver to LocalFrameLifecycleObserver. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebased Created 5 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #include "config.h" 5 #include "config.h"
6 #include "modules/presentation/PresentationController.h" 6 #include "modules/presentation/PresentationController.h"
7 7
8 #include "core/frame/LocalFrame.h" 8 #include "core/frame/LocalFrame.h"
9 #include "modules/presentation/PresentationSession.h" 9 #include "modules/presentation/PresentationSession.h"
10 #include "public/platform/modules/presentation/WebPresentationClient.h" 10 #include "public/platform/modules/presentation/WebPresentationClient.h"
11 11
12 namespace blink { 12 namespace blink {
13 13
14 PresentationController::PresentationController(LocalFrame& frame, WebPresentatio nClient* client) 14 PresentationController::PresentationController(LocalFrame& frame, WebPresentatio nClient* client)
15 : FrameDestructionObserver(&frame) 15 : LocalFrameLifecycleObserver(&frame)
16 , m_client(client) 16 , m_client(client)
17 { 17 {
18 if (m_client) 18 if (m_client)
19 m_client->setController(this); 19 m_client->setController(this);
20 } 20 }
21 21
22 PresentationController::~PresentationController() 22 PresentationController::~PresentationController()
23 { 23 {
24 if (m_client) 24 if (m_client)
25 m_client->setController(nullptr); 25 m_client->setController(nullptr);
(...skipping 20 matching lines...) Expand all
46 // static 46 // static
47 void PresentationController::provideTo(LocalFrame& frame, WebPresentationClient* client) 47 void PresentationController::provideTo(LocalFrame& frame, WebPresentationClient* client)
48 { 48 {
49 WillBeHeapSupplement<LocalFrame>::provideTo(frame, PresentationController::s upplementName(), PresentationController::create(frame, client)); 49 WillBeHeapSupplement<LocalFrame>::provideTo(frame, PresentationController::s upplementName(), PresentationController::create(frame, client));
50 } 50 }
51 51
52 DEFINE_TRACE(PresentationController) 52 DEFINE_TRACE(PresentationController)
53 { 53 {
54 visitor->trace(m_presentation); 54 visitor->trace(m_presentation);
55 WillBeHeapSupplement<LocalFrame>::trace(visitor); 55 WillBeHeapSupplement<LocalFrame>::trace(visitor);
56 FrameDestructionObserver::trace(visitor); 56 LocalFrameLifecycleObserver::trace(visitor);
57 } 57 }
58 58
59 void PresentationController::didChangeAvailability(bool available) 59 void PresentationController::didChangeAvailability(bool available)
60 { 60 {
61 if (m_presentation) 61 if (m_presentation)
62 m_presentation->didChangeAvailability(available); 62 m_presentation->didChangeAvailability(available);
63 } 63 }
64 64
65 bool PresentationController::isAvailableChangeWatched() const 65 bool PresentationController::isAvailableChangeWatched() const
66 { 66 {
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 118
119 void PresentationController::willDetachFrameHost() 119 void PresentationController::willDetachFrameHost()
120 { 120 {
121 if (m_client) { 121 if (m_client) {
122 m_client->setController(nullptr); 122 m_client->setController(nullptr);
123 m_client = nullptr; 123 m_client = nullptr;
124 } 124 }
125 } 125 }
126 126
127 } // namespace blink 127 } // namespace blink
OLDNEW
« no previous file with comments | « Source/modules/presentation/PresentationController.h ('k') | Source/modules/screen_orientation/ScreenOrientationController.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698