OLD | NEW |
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 23 matching lines...) Expand all Loading... |
34 #include "content/browser/permissions/permission_service_impl.h" | 34 #include "content/browser/permissions/permission_service_impl.h" |
35 #include "content/browser/presentation/presentation_service_impl.h" | 35 #include "content/browser/presentation/presentation_service_impl.h" |
36 #include "content/browser/renderer_host/input/input_router.h" | 36 #include "content/browser/renderer_host/input/input_router.h" |
37 #include "content/browser/renderer_host/input/timeout_monitor.h" | 37 #include "content/browser/renderer_host/input/timeout_monitor.h" |
38 #include "content/browser/renderer_host/render_process_host_impl.h" | 38 #include "content/browser/renderer_host/render_process_host_impl.h" |
39 #include "content/browser/renderer_host/render_view_host_delegate.h" | 39 #include "content/browser/renderer_host/render_view_host_delegate.h" |
40 #include "content/browser/renderer_host/render_view_host_delegate_view.h" | 40 #include "content/browser/renderer_host/render_view_host_delegate_view.h" |
41 #include "content/browser/renderer_host/render_view_host_impl.h" | 41 #include "content/browser/renderer_host/render_view_host_impl.h" |
42 #include "content/browser/renderer_host/render_widget_host_impl.h" | 42 #include "content/browser/renderer_host/render_widget_host_impl.h" |
43 #include "content/browser/renderer_host/render_widget_host_view_base.h" | 43 #include "content/browser/renderer_host/render_widget_host_view_base.h" |
44 #include "content/browser/wake_lock/wake_lock_service_context.h" | |
45 #include "content/common/accessibility_messages.h" | 44 #include "content/common/accessibility_messages.h" |
46 #include "content/common/frame_messages.h" | 45 #include "content/common/frame_messages.h" |
47 #include "content/common/input_messages.h" | 46 #include "content/common/input_messages.h" |
48 #include "content/common/inter_process_time_ticks_converter.h" | 47 #include "content/common/inter_process_time_ticks_converter.h" |
49 #include "content/common/navigation_params.h" | 48 #include "content/common/navigation_params.h" |
50 #include "content/common/render_frame_setup.mojom.h" | 49 #include "content/common/render_frame_setup.mojom.h" |
51 #include "content/common/site_isolation_policy.h" | 50 #include "content/common/site_isolation_policy.h" |
52 #include "content/common/swapped_out_messages.h" | 51 #include "content/common/swapped_out_messages.h" |
53 #include "content/public/browser/ax_event_notification_details.h" | 52 #include "content/public/browser/ax_event_notification_details.h" |
54 #include "content/public/browser/browser_accessibility_state.h" | 53 #include "content/public/browser/browser_accessibility_state.h" |
(...skipping 1520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1575 // TODO(creis): Bind process ID here so that GeolocationServiceImpl | 1574 // TODO(creis): Bind process ID here so that GeolocationServiceImpl |
1576 // can perform permissions checks once site isolation is complete. | 1575 // can perform permissions checks once site isolation is complete. |
1577 // crbug.com/426384 | 1576 // crbug.com/426384 |
1578 GetServiceRegistry()->AddService<GeolocationService>( | 1577 GetServiceRegistry()->AddService<GeolocationService>( |
1579 base::Bind(&GeolocationServiceContext::CreateService, | 1578 base::Bind(&GeolocationServiceContext::CreateService, |
1580 base::Unretained(geolocation_service_context), | 1579 base::Unretained(geolocation_service_context), |
1581 base::Bind(&RenderFrameHostImpl::DidUseGeolocationPermission, | 1580 base::Bind(&RenderFrameHostImpl::DidUseGeolocationPermission, |
1582 base::Unretained(this)))); | 1581 base::Unretained(this)))); |
1583 } | 1582 } |
1584 | 1583 |
1585 WakeLockServiceContext* wake_lock_service_context = | |
1586 delegate_ ? delegate_->GetWakeLockServiceContext() : nullptr; | |
1587 if (wake_lock_service_context) { | |
1588 int frame_id = frame_tree_node()->frame_tree_node_id(); | |
1589 | |
1590 // WakeLockServiceContext is owned by WebContentsImpl so it will outlive | |
1591 // this RenderFrameHostImpl, hence a raw pointer can be bound to service | |
1592 // factory callback. | |
1593 GetServiceRegistry()->AddService<WakeLockService>( | |
1594 base::Bind(&WakeLockServiceContext::CreateService, | |
1595 base::Unretained(wake_lock_service_context), | |
1596 frame_id)); | |
1597 } | |
1598 | |
1599 if (!permission_service_context_) | 1584 if (!permission_service_context_) |
1600 permission_service_context_.reset(new PermissionServiceContext(this)); | 1585 permission_service_context_.reset(new PermissionServiceContext(this)); |
1601 | 1586 |
1602 GetServiceRegistry()->AddService<PermissionService>( | 1587 GetServiceRegistry()->AddService<PermissionService>( |
1603 base::Bind(&PermissionServiceContext::CreateService, | 1588 base::Bind(&PermissionServiceContext::CreateService, |
1604 base::Unretained(permission_service_context_.get()))); | 1589 base::Unretained(permission_service_context_.get()))); |
1605 | 1590 |
1606 GetServiceRegistry()->AddService<presentation::PresentationService>( | 1591 GetServiceRegistry()->AddService<presentation::PresentationService>( |
1607 base::Bind(&PresentationServiceImpl::CreateMojoService, | 1592 base::Bind(&PresentationServiceImpl::CreateMojoService, |
1608 base::Unretained(this))); | 1593 base::Unretained(this))); |
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2240 BrowserPluginInstanceIDToAXTreeID(value))); | 2225 BrowserPluginInstanceIDToAXTreeID(value))); |
2241 break; | 2226 break; |
2242 case AX_CONTENT_INT_ATTRIBUTE_LAST: | 2227 case AX_CONTENT_INT_ATTRIBUTE_LAST: |
2243 NOTREACHED(); | 2228 NOTREACHED(); |
2244 break; | 2229 break; |
2245 } | 2230 } |
2246 } | 2231 } |
2247 } | 2232 } |
2248 | 2233 |
2249 } // namespace content | 2234 } // namespace content |
OLD | NEW |