Chromium Code Reviews| 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 <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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 73 #include "content/public/browser/stream_handle.h" | 73 #include "content/public/browser/stream_handle.h" |
| 74 #include "content/public/browser/user_metrics.h" | 74 #include "content/public/browser/user_metrics.h" |
| 75 #include "content/public/common/browser_side_navigation_policy.h" | 75 #include "content/public/common/browser_side_navigation_policy.h" |
| 76 #include "content/public/common/content_constants.h" | 76 #include "content/public/common/content_constants.h" |
| 77 #include "content/public/common/content_switches.h" | 77 #include "content/public/common/content_switches.h" |
| 78 #include "content/public/common/file_chooser_file_info.h" | 78 #include "content/public/common/file_chooser_file_info.h" |
| 79 #include "content/public/common/file_chooser_params.h" | 79 #include "content/public/common/file_chooser_params.h" |
| 80 #include "content/public/common/isolated_world_ids.h" | 80 #include "content/public/common/isolated_world_ids.h" |
| 81 #include "content/public/common/url_constants.h" | 81 #include "content/public/common/url_constants.h" |
| 82 #include "content/public/common/url_utils.h" | 82 #include "content/public/common/url_utils.h" |
| 83 #include "device/generic_sensor/sensor_service.h" | |
| 83 #include "device/geolocation/geolocation_service_context.h" | 84 #include "device/geolocation/geolocation_service_context.h" |
| 84 #include "device/vibration/vibration_manager_impl.h" | 85 #include "device/vibration/vibration_manager_impl.h" |
| 85 #include "media/mojo/interfaces/media_service.mojom.h" | 86 #include "media/mojo/interfaces/media_service.mojom.h" |
| 86 #include "media/mojo/interfaces/service_factory.mojom.h" | 87 #include "media/mojo/interfaces/service_factory.mojom.h" |
| 87 #include "services/shell/public/cpp/connector.h" | 88 #include "services/shell/public/cpp/connector.h" |
| 88 #include "services/shell/public/cpp/interface_provider.h" | 89 #include "services/shell/public/cpp/interface_provider.h" |
| 89 #include "ui/accessibility/ax_tree.h" | 90 #include "ui/accessibility/ax_tree.h" |
| 90 #include "ui/accessibility/ax_tree_update.h" | 91 #include "ui/accessibility/ax_tree_update.h" |
| 91 #include "ui/gfx/geometry/quad_f.h" | 92 #include "ui/gfx/geometry/quad_f.h" |
| 92 #include "url/gurl.h" | 93 #include "url/gurl.h" |
| (...skipping 2041 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2134 | 2135 |
| 2135 #if defined(ENABLE_WEBVR) | 2136 #if defined(ENABLE_WEBVR) |
| 2136 const base::CommandLine& browser_command_line = | 2137 const base::CommandLine& browser_command_line = |
| 2137 *base::CommandLine::ForCurrentProcess(); | 2138 *base::CommandLine::ForCurrentProcess(); |
| 2138 | 2139 |
| 2139 if (browser_command_line.HasSwitch(switches::kEnableWebVR)) { | 2140 if (browser_command_line.HasSwitch(switches::kEnableWebVR)) { |
| 2140 GetInterfaceRegistry()->AddInterface<device::VRService>( | 2141 GetInterfaceRegistry()->AddInterface<device::VRService>( |
| 2141 base::Bind(&device::VRServiceImpl::BindRequest)); | 2142 base::Bind(&device::VRServiceImpl::BindRequest)); |
| 2142 } | 2143 } |
| 2143 #endif | 2144 #endif |
| 2145 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | |
| 2146 switches::kEnableGenericSensors)) { | |
| 2147 GetInterfaceRegistry()->AddInterface(base::Bind( | |
| 2148 &device::SensorService::BindRequest, | |
| 2149 base::RetainedRef( | |
|
Reilly Grant (use Gerrit)
2016/08/10 18:00:19
base::RetainedRef() is not necessary here as GetTa
Mikhail
2016/08/10 18:16:50
Done.
| |
| 2150 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)))); | |
| 2151 } | |
| 2144 | 2152 |
| 2145 GetContentClient()->browser()->RegisterRenderFrameMojoInterfaces( | 2153 GetContentClient()->browser()->RegisterRenderFrameMojoInterfaces( |
| 2146 GetInterfaceRegistry(), this); | 2154 GetInterfaceRegistry(), this); |
| 2147 } | 2155 } |
| 2148 | 2156 |
| 2149 void RenderFrameHostImpl::ResetWaitingState() { | 2157 void RenderFrameHostImpl::ResetWaitingState() { |
| 2150 DCHECK(is_active()); | 2158 DCHECK(is_active()); |
| 2151 | 2159 |
| 2152 // The active state of the RVH is determined by its main frame, since | 2160 // The active state of the RVH is determined by its main frame, since |
| 2153 // subframes should have their own widgets. | 2161 // subframes should have their own widgets. |
| (...skipping 891 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3045 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( | 3053 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( |
| 3046 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); | 3054 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); |
| 3047 return web_bluetooth_service_.get(); | 3055 return web_bluetooth_service_.get(); |
| 3048 } | 3056 } |
| 3049 | 3057 |
| 3050 void RenderFrameHostImpl::DeleteWebBluetoothService() { | 3058 void RenderFrameHostImpl::DeleteWebBluetoothService() { |
| 3051 web_bluetooth_service_.reset(); | 3059 web_bluetooth_service_.reset(); |
| 3052 } | 3060 } |
| 3053 | 3061 |
| 3054 } // namespace content | 3062 } // namespace content |
| OLD | NEW |