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

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

Issue 2356193002: [Sensors] Adding chrome flag to enable Generic Sensor based APIs (Closed)
Patch Set: Updated histograms.xml Created 4 years, 3 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 #include "content/public/browser/content_browser_client.h" 70 #include "content/public/browser/content_browser_client.h"
71 #include "content/public/browser/permission_manager.h" 71 #include "content/public/browser/permission_manager.h"
72 #include "content/public/browser/permission_type.h" 72 #include "content/public/browser/permission_type.h"
73 #include "content/public/browser/render_process_host.h" 73 #include "content/public/browser/render_process_host.h"
74 #include "content/public/browser/render_widget_host_view.h" 74 #include "content/public/browser/render_widget_host_view.h"
75 #include "content/public/browser/storage_partition.h" 75 #include "content/public/browser/storage_partition.h"
76 #include "content/public/browser/stream_handle.h" 76 #include "content/public/browser/stream_handle.h"
77 #include "content/public/browser/user_metrics.h" 77 #include "content/public/browser/user_metrics.h"
78 #include "content/public/common/browser_side_navigation_policy.h" 78 #include "content/public/common/browser_side_navigation_policy.h"
79 #include "content/public/common/content_constants.h" 79 #include "content/public/common/content_constants.h"
80 #include "content/public/common/content_features.h"
80 #include "content/public/common/content_switches.h" 81 #include "content/public/common/content_switches.h"
81 #include "content/public/common/file_chooser_file_info.h" 82 #include "content/public/common/file_chooser_file_info.h"
82 #include "content/public/common/file_chooser_params.h" 83 #include "content/public/common/file_chooser_params.h"
83 #include "content/public/common/isolated_world_ids.h" 84 #include "content/public/common/isolated_world_ids.h"
84 #include "content/public/common/mojo_shell_connection.h" 85 #include "content/public/common/mojo_shell_connection.h"
85 #include "content/public/common/url_constants.h" 86 #include "content/public/common/url_constants.h"
86 #include "content/public/common/url_utils.h" 87 #include "content/public/common/url_utils.h"
87 #include "device/generic_sensor/sensor_provider_impl.h" 88 #include "device/generic_sensor/sensor_provider_impl.h"
88 #include "device/geolocation/geolocation_service_context.h" 89 #include "device/geolocation/geolocation_service_context.h"
89 #include "device/vibration/vibration_manager_impl.h" 90 #include "device/vibration/vibration_manager_impl.h"
(...skipping 2096 matching lines...) Expand 10 before | Expand all | Expand 10 after
2186 2187
2187 #if defined(ENABLE_WEBVR) 2188 #if defined(ENABLE_WEBVR)
2188 const base::CommandLine& browser_command_line = 2189 const base::CommandLine& browser_command_line =
2189 *base::CommandLine::ForCurrentProcess(); 2190 *base::CommandLine::ForCurrentProcess();
2190 2191
2191 if (browser_command_line.HasSwitch(switches::kEnableWebVR)) { 2192 if (browser_command_line.HasSwitch(switches::kEnableWebVR)) {
2192 GetInterfaceRegistry()->AddInterface<device::VRService>( 2193 GetInterfaceRegistry()->AddInterface<device::VRService>(
2193 base::Bind(&device::VRServiceImpl::BindRequest)); 2194 base::Bind(&device::VRServiceImpl::BindRequest));
2194 } 2195 }
2195 #endif 2196 #endif
2196 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 2197 if (base::FeatureList::IsEnabled(features::kGenericSensor)) {
2197 switches::kEnableGenericSensors)) {
2198 GetInterfaceRegistry()->AddInterface( 2198 GetInterfaceRegistry()->AddInterface(
2199 base::Bind(&device::SensorProviderImpl::Create), 2199 base::Bind(&device::SensorProviderImpl::Create),
2200 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); 2200 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO));
2201 } 2201 }
2202 2202
2203 GetContentClient()->browser()->RegisterRenderFrameMojoInterfaces( 2203 GetContentClient()->browser()->RegisterRenderFrameMojoInterfaces(
2204 GetInterfaceRegistry(), this); 2204 GetInterfaceRegistry(), this);
2205 } 2205 }
2206 2206
2207 void RenderFrameHostImpl::ResetWaitingState() { 2207 void RenderFrameHostImpl::ResetWaitingState() {
(...skipping 892 matching lines...) Expand 10 before | Expand all | Expand 10 after
3100 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( 3100 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind(
3101 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); 3101 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this)));
3102 return web_bluetooth_service_.get(); 3102 return web_bluetooth_service_.get();
3103 } 3103 }
3104 3104
3105 void RenderFrameHostImpl::DeleteWebBluetoothService() { 3105 void RenderFrameHostImpl::DeleteWebBluetoothService() {
3106 web_bluetooth_service_.reset(); 3106 web_bluetooth_service_.reset();
3107 } 3107 }
3108 3108
3109 } // namespace content 3109 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698