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

Side by Side Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 839773002: Plumbing from WebPresentationClient to the Presentation Mojo service for (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated comment Created 5 years, 10 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
« no previous file with comments | « no previous file | content/browser/presentation/OWNERS » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/browser/frame_host/render_frame_host_impl.h" 5 #include "content/browser/frame_host/render_frame_host_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/containers/hash_tables.h" 9 #include "base/containers/hash_tables.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 10 matching lines...) Expand all
21 #include "content/browser/frame_host/frame_tree.h" 21 #include "content/browser/frame_host/frame_tree.h"
22 #include "content/browser/frame_host/frame_tree_node.h" 22 #include "content/browser/frame_host/frame_tree_node.h"
23 #include "content/browser/frame_host/navigator.h" 23 #include "content/browser/frame_host/navigator.h"
24 #include "content/browser/frame_host/navigator_impl.h" 24 #include "content/browser/frame_host/navigator_impl.h"
25 #include "content/browser/frame_host/render_frame_host_delegate.h" 25 #include "content/browser/frame_host/render_frame_host_delegate.h"
26 #include "content/browser/frame_host/render_frame_proxy_host.h" 26 #include "content/browser/frame_host/render_frame_proxy_host.h"
27 #include "content/browser/frame_host/render_widget_host_view_child_frame.h" 27 #include "content/browser/frame_host/render_widget_host_view_child_frame.h"
28 #include "content/browser/geolocation/geolocation_service_context.h" 28 #include "content/browser/geolocation/geolocation_service_context.h"
29 #include "content/browser/permissions/permission_service_context.h" 29 #include "content/browser/permissions/permission_service_context.h"
30 #include "content/browser/permissions/permission_service_impl.h" 30 #include "content/browser/permissions/permission_service_impl.h"
31 #include "content/browser/presentation/presentation_service_impl.h"
31 #include "content/browser/renderer_host/input/input_router.h" 32 #include "content/browser/renderer_host/input/input_router.h"
32 #include "content/browser/renderer_host/input/timeout_monitor.h" 33 #include "content/browser/renderer_host/input/timeout_monitor.h"
33 #include "content/browser/renderer_host/render_process_host_impl.h" 34 #include "content/browser/renderer_host/render_process_host_impl.h"
34 #include "content/browser/renderer_host/render_view_host_delegate.h" 35 #include "content/browser/renderer_host/render_view_host_delegate.h"
35 #include "content/browser/renderer_host/render_view_host_delegate_view.h" 36 #include "content/browser/renderer_host/render_view_host_delegate_view.h"
36 #include "content/browser/renderer_host/render_view_host_impl.h" 37 #include "content/browser/renderer_host/render_view_host_impl.h"
37 #include "content/browser/renderer_host/render_widget_host_impl.h" 38 #include "content/browser/renderer_host/render_widget_host_impl.h"
38 #include "content/browser/renderer_host/render_widget_host_view_base.h" 39 #include "content/browser/renderer_host/render_widget_host_view_base.h"
39 #include "content/browser/transition_request_manager.h" 40 #include "content/browser/transition_request_manager.h"
40 #include "content/common/accessibility_messages.h" 41 #include "content/common/accessibility_messages.h"
(...skipping 1260 matching lines...) Expand 10 before | Expand all | Expand 10 after
1301 base::Unretained(this)))); 1302 base::Unretained(this))));
1302 } 1303 }
1303 1304
1304 if (!permission_service_context_) 1305 if (!permission_service_context_)
1305 permission_service_context_.reset(new PermissionServiceContext(this)); 1306 permission_service_context_.reset(new PermissionServiceContext(this));
1306 1307
1307 GetServiceRegistry()->AddService<PermissionService>( 1308 GetServiceRegistry()->AddService<PermissionService>(
1308 base::Bind(&PermissionServiceContext::CreateService, 1309 base::Bind(&PermissionServiceContext::CreateService,
1309 base::Unretained(permission_service_context_.get()))); 1310 base::Unretained(permission_service_context_.get())));
1310 1311
1312 GetServiceRegistry()->AddService<presentation::PresentationService>(
1313 base::Bind(&PresentationServiceImpl::CreateMojoService));
1314
1311 #if defined(ENABLE_MEDIA_MOJO_RENDERER) 1315 #if defined(ENABLE_MEDIA_MOJO_RENDERER)
1312 GetServiceRegistry()->AddService<mojo::MediaRenderer>( 1316 GetServiceRegistry()->AddService<mojo::MediaRenderer>(
1313 base::Bind(&CreateMediaRendererService)); 1317 base::Bind(&CreateMediaRendererService));
1314 #endif 1318 #endif
1315 } 1319 }
1316 1320
1317 void RenderFrameHostImpl::SetState(RenderFrameHostImplState rfh_state) { 1321 void RenderFrameHostImpl::SetState(RenderFrameHostImplState rfh_state) {
1318 // Only main frames should be swapped out and retained inside a proxy host. 1322 // Only main frames should be swapped out and retained inside a proxy host.
1319 if (rfh_state == STATE_SWAPPED_OUT) 1323 if (rfh_state == STATE_SWAPPED_OUT)
1320 CHECK(!GetParent()); 1324 CHECK(!GetParent());
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
1767 void RenderFrameHostImpl::DidUseGeolocationPermission() { 1771 void RenderFrameHostImpl::DidUseGeolocationPermission() {
1768 RenderFrameHost* top_frame = frame_tree_node()->frame_tree()->GetMainFrame(); 1772 RenderFrameHost* top_frame = frame_tree_node()->frame_tree()->GetMainFrame();
1769 GetContentClient()->browser()->RegisterPermissionUsage( 1773 GetContentClient()->browser()->RegisterPermissionUsage(
1770 PERMISSION_GEOLOCATION, 1774 PERMISSION_GEOLOCATION,
1771 delegate_->GetAsWebContents(), 1775 delegate_->GetAsWebContents(),
1772 GetLastCommittedURL().GetOrigin(), 1776 GetLastCommittedURL().GetOrigin(),
1773 top_frame->GetLastCommittedURL().GetOrigin()); 1777 top_frame->GetLastCommittedURL().GetOrigin());
1774 } 1778 }
1775 1779
1776 } // namespace content 1780 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/presentation/OWNERS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698