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

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: Created 5 years, 11 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 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"
11 #include "base/metrics/histogram.h" 11 #include "base/metrics/histogram.h"
12 #include "base/metrics/user_metrics_action.h" 12 #include "base/metrics/user_metrics_action.h"
13 #include "base/time/time.h" 13 #include "base/time/time.h"
14 #include "content/browser/accessibility/accessibility_mode_helper.h" 14 #include "content/browser/accessibility/accessibility_mode_helper.h"
15 #include "content/browser/accessibility/browser_accessibility_manager.h" 15 #include "content/browser/accessibility/browser_accessibility_manager.h"
16 #include "content/browser/accessibility/browser_accessibility_state_impl.h" 16 #include "content/browser/accessibility/browser_accessibility_state_impl.h"
17 #include "content/browser/child_process_security_policy_impl.h" 17 #include "content/browser/child_process_security_policy_impl.h"
18 #include "content/browser/frame_host/cross_process_frame_connector.h" 18 #include "content/browser/frame_host/cross_process_frame_connector.h"
19 #include "content/browser/frame_host/cross_site_transferring_request.h" 19 #include "content/browser/frame_host/cross_site_transferring_request.h"
20 #include "content/browser/frame_host/frame_accessibility.h" 20 #include "content/browser/frame_host/frame_accessibility.h"
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/render_frame_host_delegate.h" 24 #include "content/browser/frame_host/render_frame_host_delegate.h"
25 #include "content/browser/frame_host/render_frame_proxy_host.h" 25 #include "content/browser/frame_host/render_frame_proxy_host.h"
26 #include "content/browser/frame_host/render_widget_host_view_child_frame.h" 26 #include "content/browser/frame_host/render_widget_host_view_child_frame.h"
27 #include "content/browser/geolocation/geolocation_service_context.h" 27 #include "content/browser/geolocation/geolocation_service_context.h"
28 #include "content/browser/permissions/permission_service_context.h" 28 #include "content/browser/permissions/permission_service_context.h"
29 #include "content/browser/permissions/permission_service_impl.h" 29 #include "content/browser/permissions/permission_service_impl.h"
30 #include "content/browser/presentation/presentation_service_impl.h"
30 #include "content/browser/renderer_host/input/input_router.h" 31 #include "content/browser/renderer_host/input/input_router.h"
31 #include "content/browser/renderer_host/input/timeout_monitor.h" 32 #include "content/browser/renderer_host/input/timeout_monitor.h"
32 #include "content/browser/renderer_host/render_process_host_impl.h" 33 #include "content/browser/renderer_host/render_process_host_impl.h"
33 #include "content/browser/renderer_host/render_view_host_delegate.h" 34 #include "content/browser/renderer_host/render_view_host_delegate.h"
34 #include "content/browser/renderer_host/render_view_host_delegate_view.h" 35 #include "content/browser/renderer_host/render_view_host_delegate_view.h"
35 #include "content/browser/renderer_host/render_view_host_impl.h" 36 #include "content/browser/renderer_host/render_view_host_impl.h"
36 #include "content/browser/renderer_host/render_widget_host_impl.h" 37 #include "content/browser/renderer_host/render_widget_host_impl.h"
37 #include "content/browser/renderer_host/render_widget_host_view_base.h" 38 #include "content/browser/renderer_host/render_widget_host_view_base.h"
38 #include "content/browser/transition_request_manager.h" 39 #include "content/browser/transition_request_manager.h"
39 #include "content/common/accessibility_messages.h" 40 #include "content/common/accessibility_messages.h"
(...skipping 1128 matching lines...) Expand 10 before | Expand all | Expand 10 after
1168 base::Bind(&RenderFrameHostImpl::DidUseGeolocationPermission, 1169 base::Bind(&RenderFrameHostImpl::DidUseGeolocationPermission,
1169 base::Unretained(this)))); 1170 base::Unretained(this))));
1170 } 1171 }
1171 1172
1172 if (!permission_service_context_) 1173 if (!permission_service_context_)
1173 permission_service_context_.reset(new PermissionServiceContext(this)); 1174 permission_service_context_.reset(new PermissionServiceContext(this));
1174 1175
1175 GetServiceRegistry()->AddService<PermissionService>( 1176 GetServiceRegistry()->AddService<PermissionService>(
1176 base::Bind(&PermissionServiceContext::CreateService, 1177 base::Bind(&PermissionServiceContext::CreateService,
1177 base::Unretained(permission_service_context_.get()))); 1178 base::Unretained(permission_service_context_.get())));
1179
1180 GetServiceRegistry()->AddService<presentation::PresentationService>(
1181 base::Bind(&PresentationServiceImpl::CreateService));
1178 } 1182 }
1179 1183
1180 void RenderFrameHostImpl::SetState(RenderFrameHostImplState rfh_state) { 1184 void RenderFrameHostImpl::SetState(RenderFrameHostImplState rfh_state) {
1181 // Only main frames should be swapped out and retained inside a proxy host. 1185 // Only main frames should be swapped out and retained inside a proxy host.
1182 if (rfh_state == STATE_SWAPPED_OUT) 1186 if (rfh_state == STATE_SWAPPED_OUT)
1183 CHECK(!GetParent()); 1187 CHECK(!GetParent());
1184 1188
1185 // We update the number of RenderFrameHosts in a SiteInstance when the swapped 1189 // We update the number of RenderFrameHosts in a SiteInstance when the swapped
1186 // out status of a RenderFrameHost gets flipped to/from active. 1190 // out status of a RenderFrameHost gets flipped to/from active.
1187 if (!IsRFHStateActive(rfh_state_) && IsRFHStateActive(rfh_state)) 1191 if (!IsRFHStateActive(rfh_state_) && IsRFHStateActive(rfh_state))
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
1608 void RenderFrameHostImpl::DidUseGeolocationPermission() { 1612 void RenderFrameHostImpl::DidUseGeolocationPermission() {
1609 RenderFrameHost* top_frame = frame_tree_node()->frame_tree()->GetMainFrame(); 1613 RenderFrameHost* top_frame = frame_tree_node()->frame_tree()->GetMainFrame();
1610 GetContentClient()->browser()->RegisterPermissionUsage( 1614 GetContentClient()->browser()->RegisterPermissionUsage(
1611 PERMISSION_GEOLOCATION, 1615 PERMISSION_GEOLOCATION,
1612 delegate_->GetAsWebContents(), 1616 delegate_->GetAsWebContents(),
1613 GetLastCommittedURL().GetOrigin(), 1617 GetLastCommittedURL().GetOrigin(),
1614 top_frame->GetLastCommittedURL().GetOrigin()); 1618 top_frame->GetLastCommittedURL().GetOrigin());
1615 } 1619 }
1616 1620
1617 } // namespace content 1621 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/presentation/OWNERS » ('j') | content/browser/presentation/presentation_service_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698