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" | |
44 #include "content/common/accessibility_messages.h" | 45 #include "content/common/accessibility_messages.h" |
45 #include "content/common/frame_messages.h" | 46 #include "content/common/frame_messages.h" |
46 #include "content/common/input_messages.h" | 47 #include "content/common/input_messages.h" |
47 #include "content/common/inter_process_time_ticks_converter.h" | 48 #include "content/common/inter_process_time_ticks_converter.h" |
48 #include "content/common/navigation_params.h" | 49 #include "content/common/navigation_params.h" |
49 #include "content/common/render_frame_setup.mojom.h" | 50 #include "content/common/render_frame_setup.mojom.h" |
50 #include "content/common/site_isolation_policy.h" | 51 #include "content/common/site_isolation_policy.h" |
51 #include "content/common/swapped_out_messages.h" | 52 #include "content/common/swapped_out_messages.h" |
52 #include "content/public/browser/ax_event_notification_details.h" | 53 #include "content/public/browser/ax_event_notification_details.h" |
53 #include "content/public/browser/browser_accessibility_state.h" | 54 #include "content/public/browser/browser_accessibility_state.h" |
(...skipping 1529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1583 // TODO(creis): Bind process ID here so that GeolocationServiceImpl | 1584 // TODO(creis): Bind process ID here so that GeolocationServiceImpl |
1584 // can perform permissions checks once site isolation is complete. | 1585 // can perform permissions checks once site isolation is complete. |
1585 // crbug.com/426384 | 1586 // crbug.com/426384 |
1586 GetServiceRegistry()->AddService<GeolocationService>( | 1587 GetServiceRegistry()->AddService<GeolocationService>( |
1587 base::Bind(&GeolocationServiceContext::CreateService, | 1588 base::Bind(&GeolocationServiceContext::CreateService, |
1588 base::Unretained(geolocation_service_context), | 1589 base::Unretained(geolocation_service_context), |
1589 base::Bind(&RenderFrameHostImpl::DidUseGeolocationPermission, | 1590 base::Bind(&RenderFrameHostImpl::DidUseGeolocationPermission, |
1590 base::Unretained(this)))); | 1591 base::Unretained(this)))); |
1591 } | 1592 } |
1592 | 1593 |
1594 WakeLockServiceContext* wake_lock_service_context = | |
1595 delegate_ ? delegate_->GetWakeLockServiceContext() : nullptr; | |
1596 if (wake_lock_service_context) { | |
1597 GetServiceRegistry()->AddService<WakeLockService>( | |
1598 base::Bind(&WakeLockServiceContext::CreateService, | |
1599 base::Unretained(wake_lock_service_context), | |
1600 base::Unretained(this))); | |
nasko
2015/09/02 22:40:14
Can you put a comment why using base::Unretained(t
alogvinov
2015/09/03 16:25:00
Done.
| |
1601 } | |
1602 | |
1593 if (!permission_service_context_) | 1603 if (!permission_service_context_) |
1594 permission_service_context_.reset(new PermissionServiceContext(this)); | 1604 permission_service_context_.reset(new PermissionServiceContext(this)); |
1595 | 1605 |
1596 GetServiceRegistry()->AddService<PermissionService>( | 1606 GetServiceRegistry()->AddService<PermissionService>( |
1597 base::Bind(&PermissionServiceContext::CreateService, | 1607 base::Bind(&PermissionServiceContext::CreateService, |
1598 base::Unretained(permission_service_context_.get()))); | 1608 base::Unretained(permission_service_context_.get()))); |
1599 | 1609 |
1600 GetServiceRegistry()->AddService<presentation::PresentationService>( | 1610 GetServiceRegistry()->AddService<presentation::PresentationService>( |
1601 base::Bind(&PresentationServiceImpl::CreateMojoService, | 1611 base::Bind(&PresentationServiceImpl::CreateMojoService, |
1602 base::Unretained(this))); | 1612 base::Unretained(this))); |
(...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2215 BrowserPluginInstanceIDToAXTreeID(value))); | 2225 BrowserPluginInstanceIDToAXTreeID(value))); |
2216 break; | 2226 break; |
2217 case AX_CONTENT_INT_ATTRIBUTE_LAST: | 2227 case AX_CONTENT_INT_ATTRIBUTE_LAST: |
2218 NOTREACHED(); | 2228 NOTREACHED(); |
2219 break; | 2229 break; |
2220 } | 2230 } |
2221 } | 2231 } |
2222 } | 2232 } |
2223 | 2233 |
2224 } // namespace content | 2234 } // namespace content |
OLD | NEW |