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 "content/renderer/presentation/presentation_dispatcher.h" | 5 #include "content/renderer/presentation/presentation_dispatcher.h" |
6 | 6 |
7 #include "content/common/presentation/presentation_service.mojom.h" | 7 #include "content/common/presentation/presentation_service.mojom.h" |
8 #include "content/public/common/service_registry.h" | 8 #include "content/public/common/service_registry.h" |
9 #include "content/public/renderer/render_frame.h" | 9 #include "content/public/renderer/render_frame.h" |
10 #include "third_party/WebKit/public/platform/WebPresentationController.h" | 10 #include "third_party/WebKit/public/platform/modules/presentation/WebPresentatio
nController.h" |
11 | 11 |
12 namespace content { | 12 namespace content { |
13 | 13 |
14 PresentationDispatcher::PresentationDispatcher(RenderFrame* render_frame) | 14 PresentationDispatcher::PresentationDispatcher(RenderFrame* render_frame) |
15 : RenderFrameObserver(render_frame), | 15 : RenderFrameObserver(render_frame), |
16 controller_(nullptr) { | 16 controller_(nullptr) { |
17 } | 17 } |
18 | 18 |
19 PresentationDispatcher::~PresentationDispatcher() { | 19 PresentationDispatcher::~PresentationDispatcher() { |
20 // Controller should be destroyed before the dispatcher when frame is | 20 // Controller should be destroyed before the dispatcher when frame is |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 | 56 |
57 void PresentationDispatcher::ConnectToPresentationServiceIfNeeded() { | 57 void PresentationDispatcher::ConnectToPresentationServiceIfNeeded() { |
58 if (presentation_service_.get()) | 58 if (presentation_service_.get()) |
59 return; | 59 return; |
60 | 60 |
61 render_frame()->GetServiceRegistry()->ConnectToRemoteService( | 61 render_frame()->GetServiceRegistry()->ConnectToRemoteService( |
62 &presentation_service_); | 62 &presentation_service_); |
63 } | 63 } |
64 | 64 |
65 } // namespace content | 65 } // namespace content |
OLD | NEW |