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 <memory> |
7 #include "core/dom/Document.h" | 8 #include "core/dom/Document.h" |
8 #include "core/frame/LocalFrame.h" | 9 #include "core/frame/LocalFrame.h" |
9 #include "modules/presentation/PresentationConnection.h" | 10 #include "modules/presentation/PresentationConnection.h" |
10 #include "public/platform/WebString.h" | 11 #include "public/platform/WebString.h" |
11 #include "public/platform/WebVector.h" | 12 #include "public/platform/WebVector.h" |
12 #include "public/platform/modules/presentation/WebPresentationClient.h" | 13 #include "public/platform/modules/presentation/WebPresentationClient.h" |
13 #include "wtf/PtrUtil.h" | 14 #include "wtf/PtrUtil.h" |
14 #include <memory> | |
15 | 15 |
16 namespace blink { | 16 namespace blink { |
17 | 17 |
18 PresentationController::PresentationController(LocalFrame& frame, | 18 PresentationController::PresentationController(LocalFrame& frame, |
19 WebPresentationClient* client) | 19 WebPresentationClient* client) |
20 : Supplement<LocalFrame>(frame), | 20 : Supplement<LocalFrame>(frame), |
21 ContextLifecycleObserver(frame.document()), | 21 ContextLifecycleObserver(frame.document()), |
22 m_client(client) { | 22 m_client(client) { |
23 if (m_client) | 23 if (m_client) |
24 m_client->setController(this); | 24 m_client->setController(this); |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 const WebPresentationSessionInfo& sessionInfo) { | 162 const WebPresentationSessionInfo& sessionInfo) { |
163 for (const auto& connection : m_connections) { | 163 for (const auto& connection : m_connections) { |
164 if (connection->matches(sessionInfo)) | 164 if (connection->matches(sessionInfo)) |
165 return connection.get(); | 165 return connection.get(); |
166 } | 166 } |
167 | 167 |
168 return nullptr; | 168 return nullptr; |
169 } | 169 } |
170 | 170 |
171 } // namespace blink | 171 } // namespace blink |
OLD | NEW |