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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 86 #include "content/public/common/service_manager_connection.h" | 86 #include "content/public/common/service_manager_connection.h" |
| 87 #include "content/public/common/url_constants.h" | 87 #include "content/public/common/url_constants.h" |
| 88 #include "content/public/common/url_utils.h" | 88 #include "content/public/common/url_utils.h" |
| 89 #include "device/generic_sensor/sensor_provider_impl.h" | 89 #include "device/generic_sensor/sensor_provider_impl.h" |
| 90 #include "device/geolocation/geolocation_service_context.h" | 90 #include "device/geolocation/geolocation_service_context.h" |
| 91 #include "device/vibration/vibration_manager_impl.h" | 91 #include "device/vibration/vibration_manager_impl.h" |
| 92 #include "device/wake_lock/wake_lock_service_context.h" | 92 #include "device/wake_lock/wake_lock_service_context.h" |
| 93 #include "media/mojo/interfaces/media_service.mojom.h" | 93 #include "media/mojo/interfaces/media_service.mojom.h" |
| 94 #include "media/mojo/interfaces/service_factory.mojom.h" | 94 #include "media/mojo/interfaces/service_factory.mojom.h" |
| 95 #include "mojo/public/cpp/bindings/associated_interface_ptr.h" | 95 #include "mojo/public/cpp/bindings/associated_interface_ptr.h" |
| 96 #include "public/platform/modules/shapedetection/shapedetection.mojom.h" | |
| 96 #include "services/shell/public/cpp/connector.h" | 97 #include "services/shell/public/cpp/connector.h" |
| 97 #include "services/shell/public/cpp/interface_provider.h" | 98 #include "services/shell/public/cpp/interface_provider.h" |
| 98 #include "ui/accessibility/ax_tree.h" | 99 #include "ui/accessibility/ax_tree.h" |
| 99 #include "ui/accessibility/ax_tree_update.h" | 100 #include "ui/accessibility/ax_tree_update.h" |
| 100 #include "ui/gfx/geometry/quad_f.h" | 101 #include "ui/gfx/geometry/quad_f.h" |
| 101 #include "url/gurl.h" | 102 #include "url/gurl.h" |
| 102 | 103 |
| 103 #if defined(OS_ANDROID) | 104 #if defined(OS_ANDROID) |
| 104 #include "content/public/browser/android/java_interfaces.h" | 105 #include "content/public/browser/android/java_interfaces.h" |
| 105 #if defined(ENABLE_MOJO_CDM) | 106 #if defined(ENABLE_MOJO_CDM) |
| (...skipping 2049 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2155 base::Unretained(permission_service_context_.get()))); | 2156 base::Unretained(permission_service_context_.get()))); |
| 2156 | 2157 |
| 2157 GetInterfaceRegistry()->AddInterface(base::Bind( | 2158 GetInterfaceRegistry()->AddInterface(base::Bind( |
| 2158 &PresentationServiceImpl::CreateMojoService, base::Unretained(this))); | 2159 &PresentationServiceImpl::CreateMojoService, base::Unretained(this))); |
| 2159 | 2160 |
| 2160 GetInterfaceRegistry()->AddInterface( | 2161 GetInterfaceRegistry()->AddInterface( |
| 2161 base::Bind(&MediaSessionServiceImpl::Create, base::Unretained(this))); | 2162 base::Bind(&MediaSessionServiceImpl::Create, base::Unretained(this))); |
| 2162 | 2163 |
| 2163 #if defined(OS_ANDROID) | 2164 #if defined(OS_ANDROID) |
| 2164 GetInterfaceRegistry()->AddInterface( | 2165 GetInterfaceRegistry()->AddInterface( |
| 2166 GetGlobalJavaInterfaces() | |
|
qinmin
2016/10/12 17:28:16
nit: fix the indent here
xianglu
2016/10/12 18:25:17
Done.
| |
| 2167 ->CreateInterfaceFactory<blink::mojom::ShapeDetection>()); | |
| 2168 | |
| 2169 GetInterfaceRegistry()->AddInterface( | |
| 2165 GetGlobalJavaInterfaces() | 2170 GetGlobalJavaInterfaces() |
| 2166 ->CreateInterfaceFactory<device::VibrationManager>()); | 2171 ->CreateInterfaceFactory<device::VibrationManager>()); |
| 2167 #else | 2172 #else |
| 2168 GetInterfaceRegistry()->AddInterface( | 2173 GetInterfaceRegistry()->AddInterface( |
| 2169 base::Bind(&device::VibrationManagerImpl::Create)); | 2174 base::Bind(&device::VibrationManagerImpl::Create)); |
| 2170 #endif | 2175 #endif |
| 2171 | 2176 |
| 2172 bool enable_web_bluetooth = base::CommandLine::ForCurrentProcess()->HasSwitch( | 2177 bool enable_web_bluetooth = base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 2173 switches::kEnableWebBluetooth); | 2178 switches::kEnableWebBluetooth); |
| 2174 #if defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_MACOSX) | 2179 #if defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_MACOSX) |
| (...skipping 932 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3107 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( | 3112 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( |
| 3108 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); | 3113 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); |
| 3109 return web_bluetooth_service_.get(); | 3114 return web_bluetooth_service_.get(); |
| 3110 } | 3115 } |
| 3111 | 3116 |
| 3112 void RenderFrameHostImpl::DeleteWebBluetoothService() { | 3117 void RenderFrameHostImpl::DeleteWebBluetoothService() { |
| 3113 web_bluetooth_service_.reset(); | 3118 web_bluetooth_service_.reset(); |
| 3114 } | 3119 } |
| 3115 | 3120 |
| 3116 } // namespace content | 3121 } // namespace content |
| OLD | NEW |