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

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

Issue 2142753002: Remove LocalFrameLifecycleObserver::willDetachFrameHost() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: temp Created 4 years, 5 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 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 "modules/presentation/PresentationController.h" 5 #include "modules/presentation/PresentationController.h"
6 6
7 #include "core/frame/LocalFrame.h" 7 #include "core/frame/LocalFrame.h"
8 #include "modules/presentation/PresentationConnection.h" 8 #include "modules/presentation/PresentationConnection.h"
9 #include "public/platform/modules/presentation/WebPresentationClient.h" 9 #include "public/platform/modules/presentation/WebPresentationClient.h"
10 #include "wtf/PtrUtil.h" 10 #include "wtf/PtrUtil.h"
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 m_client->setDefaultPresentationUrl(url.getString()); 124 m_client->setDefaultPresentationUrl(url.getString());
125 else 125 else
126 m_client->setDefaultPresentationUrl(blink::WebString()); 126 m_client->setDefaultPresentationUrl(blink::WebString());
127 } 127 }
128 128
129 void PresentationController::registerConnection(PresentationConnection* connecti on) 129 void PresentationController::registerConnection(PresentationConnection* connecti on)
130 { 130 {
131 m_connections.add(connection); 131 m_connections.add(connection);
132 } 132 }
133 133
134 void PresentationController::willDetachFrameHost() 134 void PresentationController::contextDestroyed()
135 { 135 {
136 if (m_client) { 136 if (m_client) {
137 m_client->setController(nullptr); 137 m_client->setController(nullptr);
138 m_client = nullptr; 138 m_client = nullptr;
139 } 139 }
140 } 140 }
141 141
142 PresentationConnection* PresentationController::findConnection(WebPresentationCo nnectionClient* connectionClient) 142 PresentationConnection* PresentationController::findConnection(WebPresentationCo nnectionClient* connectionClient)
143 { 143 {
144 for (const auto& connection : m_connections) { 144 for (const auto& connection : m_connections) {
145 if (connection->matches(connectionClient)) 145 if (connection->matches(connectionClient))
146 return connection.get(); 146 return connection.get();
147 } 147 }
148 148
149 return nullptr; 149 return nullptr;
150 } 150 }
151 151
152 } // namespace blink 152 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698