| OLD | NEW |
| 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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 presentationUrls[0] = url; | 133 presentationUrls[0] = url; |
| 134 | 134 |
| 135 m_client->setDefaultPresentationUrls(presentationUrls); | 135 m_client->setDefaultPresentationUrls(presentationUrls); |
| 136 } | 136 } |
| 137 | 137 |
| 138 void PresentationController::registerConnection( | 138 void PresentationController::registerConnection( |
| 139 PresentationConnection* connection) { | 139 PresentationConnection* connection) { |
| 140 m_connections.add(connection); | 140 m_connections.add(connection); |
| 141 } | 141 } |
| 142 | 142 |
| 143 void PresentationController::frameDestroyed() { | 143 void PresentationController::contextDestroyed() { |
| 144 if (m_client) { | 144 if (m_client) { |
| 145 m_client->setController(nullptr); | 145 m_client->setController(nullptr); |
| 146 m_client = nullptr; | 146 m_client = nullptr; |
| 147 } | 147 } |
| 148 DOMWindowProperty::frameDestroyed(); | 148 DOMWindowProperty::contextDestroyed(); |
| 149 } | 149 } |
| 150 | 150 |
| 151 PresentationConnection* PresentationController::findConnection( | 151 PresentationConnection* PresentationController::findConnection( |
| 152 WebPresentationConnectionClient* connectionClient) { | 152 WebPresentationConnectionClient* connectionClient) { |
| 153 for (const auto& connection : m_connections) { | 153 for (const auto& connection : m_connections) { |
| 154 if (connection->matches(connectionClient)) | 154 if (connection->matches(connectionClient)) |
| 155 return connection.get(); | 155 return connection.get(); |
| 156 } | 156 } |
| 157 | 157 |
| 158 return nullptr; | 158 return nullptr; |
| 159 } | 159 } |
| 160 | 160 |
| 161 } // namespace blink | 161 } // namespace blink |
| OLD | NEW |