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

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

Issue 2389743002: Content Modularization Project: Move Wake Lock to //device (Closed)
Patch Set: Eliminate frame reference Created 4 years, 2 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 <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 #include "content/browser/renderer_host/input/input_router_impl.h" 42 #include "content/browser/renderer_host/input/input_router_impl.h"
43 #include "content/browser/renderer_host/input/timeout_monitor.h" 43 #include "content/browser/renderer_host/input/timeout_monitor.h"
44 #include "content/browser/renderer_host/render_process_host_impl.h" 44 #include "content/browser/renderer_host/render_process_host_impl.h"
45 #include "content/browser/renderer_host/render_view_host_delegate.h" 45 #include "content/browser/renderer_host/render_view_host_delegate.h"
46 #include "content/browser/renderer_host/render_view_host_delegate_view.h" 46 #include "content/browser/renderer_host/render_view_host_delegate_view.h"
47 #include "content/browser/renderer_host/render_view_host_impl.h" 47 #include "content/browser/renderer_host/render_view_host_impl.h"
48 #include "content/browser/renderer_host/render_widget_host_delegate.h" 48 #include "content/browser/renderer_host/render_widget_host_delegate.h"
49 #include "content/browser/renderer_host/render_widget_host_impl.h" 49 #include "content/browser/renderer_host/render_widget_host_impl.h"
50 #include "content/browser/renderer_host/render_widget_host_view_base.h" 50 #include "content/browser/renderer_host/render_widget_host_view_base.h"
51 #include "content/browser/shared_worker/shared_worker_service_impl.h" 51 #include "content/browser/shared_worker/shared_worker_service_impl.h"
52 #include "content/browser/wake_lock/wake_lock_service_context.h"
53 #include "content/browser/websockets/websocket_manager.h" 52 #include "content/browser/websockets/websocket_manager.h"
54 #include "content/browser/webui/web_ui_controller_factory_registry.h" 53 #include "content/browser/webui/web_ui_controller_factory_registry.h"
55 #include "content/common/accessibility_messages.h" 54 #include "content/common/accessibility_messages.h"
56 #include "content/common/associated_interface_provider_impl.h" 55 #include "content/common/associated_interface_provider_impl.h"
57 #include "content/common/associated_interfaces.mojom.h" 56 #include "content/common/associated_interfaces.mojom.h"
58 #include "content/common/frame_messages.h" 57 #include "content/common/frame_messages.h"
59 #include "content/common/frame_owner_properties.h" 58 #include "content/common/frame_owner_properties.h"
60 #include "content/common/input_messages.h" 59 #include "content/common/input_messages.h"
61 #include "content/common/inter_process_time_ticks_converter.h" 60 #include "content/common/inter_process_time_ticks_converter.h"
62 #include "content/common/navigation_params.h" 61 #include "content/common/navigation_params.h"
(...skipping 17 matching lines...) Expand all
80 #include "content/public/common/content_switches.h" 79 #include "content/public/common/content_switches.h"
81 #include "content/public/common/file_chooser_file_info.h" 80 #include "content/public/common/file_chooser_file_info.h"
82 #include "content/public/common/file_chooser_params.h" 81 #include "content/public/common/file_chooser_params.h"
83 #include "content/public/common/isolated_world_ids.h" 82 #include "content/public/common/isolated_world_ids.h"
84 #include "content/public/common/mojo_shell_connection.h" 83 #include "content/public/common/mojo_shell_connection.h"
85 #include "content/public/common/url_constants.h" 84 #include "content/public/common/url_constants.h"
86 #include "content/public/common/url_utils.h" 85 #include "content/public/common/url_utils.h"
87 #include "device/generic_sensor/sensor_provider_impl.h" 86 #include "device/generic_sensor/sensor_provider_impl.h"
88 #include "device/geolocation/geolocation_service_context.h" 87 #include "device/geolocation/geolocation_service_context.h"
89 #include "device/vibration/vibration_manager_impl.h" 88 #include "device/vibration/vibration_manager_impl.h"
89 #include "device/wake_lock/wake_lock_service_context.h"
90 #include "media/mojo/interfaces/media_service.mojom.h" 90 #include "media/mojo/interfaces/media_service.mojom.h"
91 #include "media/mojo/interfaces/service_factory.mojom.h" 91 #include "media/mojo/interfaces/service_factory.mojom.h"
92 #include "mojo/public/cpp/bindings/associated_interface_ptr.h" 92 #include "mojo/public/cpp/bindings/associated_interface_ptr.h"
93 #include "services/shell/public/cpp/connector.h" 93 #include "services/shell/public/cpp/connector.h"
94 #include "services/shell/public/cpp/interface_provider.h" 94 #include "services/shell/public/cpp/interface_provider.h"
95 #include "ui/accessibility/ax_tree.h" 95 #include "ui/accessibility/ax_tree.h"
96 #include "ui/accessibility/ax_tree_update.h" 96 #include "ui/accessibility/ax_tree_update.h"
97 #include "ui/gfx/geometry/quad_f.h" 97 #include "ui/gfx/geometry/quad_f.h"
98 #include "url/gurl.h" 98 #include "url/gurl.h"
99 99
(...skipping 2018 matching lines...) Expand 10 before | Expand all | Expand 10 after
2118 // latter is triggered by receiving a message that the pipe was closed from 2118 // latter is triggered by receiving a message that the pipe was closed from
2119 // the renderer side. Hence, supply the reference to this object as a weak 2119 // the renderer side. Hence, supply the reference to this object as a weak
2120 // pointer. 2120 // pointer.
2121 GetInterfaceRegistry()->AddInterface( 2121 GetInterfaceRegistry()->AddInterface(
2122 base::Bind(&device::GeolocationServiceContext::CreateService, 2122 base::Bind(&device::GeolocationServiceContext::CreateService,
2123 base::Unretained(geolocation_service_context), 2123 base::Unretained(geolocation_service_context),
2124 base::Bind(&RenderFrameHostImpl::DidUseGeolocationPermission, 2124 base::Bind(&RenderFrameHostImpl::DidUseGeolocationPermission,
2125 weak_ptr_factory_.GetWeakPtr()))); 2125 weak_ptr_factory_.GetWeakPtr())));
2126 } 2126 }
2127 2127
2128 WakeLockServiceContext* wake_lock_service_context = 2128 device::WakeLockServiceContext* wake_lock_service_context =
2129 delegate_ ? delegate_->GetWakeLockServiceContext() : nullptr; 2129 delegate_ ? delegate_->GetWakeLockServiceContext() : nullptr;
2130 if (wake_lock_service_context) { 2130 if (wake_lock_service_context) {
2131 // WakeLockServiceContext is owned by WebContentsImpl so it will outlive 2131 // WakeLockServiceContext is owned by WebContentsImpl so it will outlive
2132 // this RenderFrameHostImpl, hence a raw pointer can be bound to service 2132 // this RenderFrameHostImpl, hence a raw pointer can be bound to service
2133 // factory callback. 2133 // factory callback.
2134 GetInterfaceRegistry()->AddInterface<blink::mojom::WakeLockService>( 2134 GetInterfaceRegistry()->AddInterface<device::mojom::WakeLockService>(
2135 base::Bind(&WakeLockServiceContext::CreateService, 2135 base::Bind(&device::WakeLockServiceContext::CreateService,
2136 base::Unretained(wake_lock_service_context))); 2136 base::Unretained(wake_lock_service_context)));
2137 } 2137 }
2138 2138
2139 if (!permission_service_context_) 2139 if (!permission_service_context_)
2140 permission_service_context_.reset(new PermissionServiceContext(this)); 2140 permission_service_context_.reset(new PermissionServiceContext(this));
2141 2141
2142 GetInterfaceRegistry()->AddInterface( 2142 GetInterfaceRegistry()->AddInterface(
2143 base::Bind(&PermissionServiceContext::CreateService, 2143 base::Bind(&PermissionServiceContext::CreateService,
2144 base::Unretained(permission_service_context_.get()))); 2144 base::Unretained(permission_service_context_.get())));
2145 2145
(...skipping 939 matching lines...) Expand 10 before | Expand all | Expand 10 after
3085 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( 3085 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind(
3086 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); 3086 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this)));
3087 return web_bluetooth_service_.get(); 3087 return web_bluetooth_service_.get();
3088 } 3088 }
3089 3089
3090 void RenderFrameHostImpl::DeleteWebBluetoothService() { 3090 void RenderFrameHostImpl::DeleteWebBluetoothService() {
3091 web_bluetooth_service_.reset(); 3091 web_bluetooth_service_.reset();
3092 } 3092 }
3093 3093
3094 } // namespace content 3094 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_frame_host_delegate.cc ('k') | content/browser/wake_lock/wake_lock_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698