| 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| 100 #if defined(OS_ANDROID) | 100 #if defined(OS_ANDROID) |
| 101 #include "content/browser/mojo/interface_registrar_android.h" | 101 #include "content/browser/mojo/interface_registrar_android.h" |
| 102 #include "content/public/browser/android/java_interfaces.h" | |
| 103 #if defined(ENABLE_MOJO_CDM) | 102 #if defined(ENABLE_MOJO_CDM) |
| 104 #include "content/browser/media/android/provision_fetcher_impl.h" | 103 #include "content/browser/media/android/provision_fetcher_impl.h" |
| 105 #endif | 104 #endif |
| 106 #endif | 105 #endif |
| 107 | 106 |
| 108 #if defined(OS_MACOSX) | 107 #if defined(OS_MACOSX) |
| 109 #include "content/browser/frame_host/popup_menu_helper_mac.h" | 108 #include "content/browser/frame_host/popup_menu_helper_mac.h" |
| 110 #endif | 109 #endif |
| 111 | 110 |
| 112 #if defined(ENABLE_WEBVR) | 111 #if defined(ENABLE_WEBVR) |
| (...skipping 2037 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2150 if (!permission_service_context_) | 2149 if (!permission_service_context_) |
| 2151 permission_service_context_.reset(new PermissionServiceContext(this)); | 2150 permission_service_context_.reset(new PermissionServiceContext(this)); |
| 2152 | 2151 |
| 2153 GetInterfaceRegistry()->AddInterface( | 2152 GetInterfaceRegistry()->AddInterface( |
| 2154 base::Bind(&PermissionServiceContext::CreateService, | 2153 base::Bind(&PermissionServiceContext::CreateService, |
| 2155 base::Unretained(permission_service_context_.get()))); | 2154 base::Unretained(permission_service_context_.get()))); |
| 2156 | 2155 |
| 2157 GetInterfaceRegistry()->AddInterface(base::Bind( | 2156 GetInterfaceRegistry()->AddInterface(base::Bind( |
| 2158 &PresentationServiceImpl::CreateMojoService, base::Unretained(this))); | 2157 &PresentationServiceImpl::CreateMojoService, base::Unretained(this))); |
| 2159 | 2158 |
| 2160 #if defined(OS_ANDROID) | 2159 #if !defined(OS_ANDROID) |
| 2161 GetInterfaceRegistry()->AddInterface( | |
| 2162 GetGlobalJavaInterfaces() | |
| 2163 ->CreateInterfaceFactory<device::VibrationManager>()); | |
| 2164 #else | |
| 2165 GetInterfaceRegistry()->AddInterface( | 2160 GetInterfaceRegistry()->AddInterface( |
| 2166 base::Bind(&device::VibrationManagerImpl::Create)); | 2161 base::Bind(&device::VibrationManagerImpl::Create)); |
| 2167 #endif | 2162 #endif |
| 2168 | 2163 |
| 2169 bool enable_web_bluetooth = base::CommandLine::ForCurrentProcess()->HasSwitch( | 2164 bool enable_web_bluetooth = base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 2170 switches::kEnableWebBluetooth); | 2165 switches::kEnableWebBluetooth); |
| 2171 #if defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_MACOSX) | 2166 #if defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_MACOSX) |
| 2172 enable_web_bluetooth = true; | 2167 enable_web_bluetooth = true; |
| 2173 #endif | 2168 #endif |
| 2174 | 2169 |
| (...skipping 929 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3104 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( | 3099 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( |
| 3105 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); | 3100 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); |
| 3106 return web_bluetooth_service_.get(); | 3101 return web_bluetooth_service_.get(); |
| 3107 } | 3102 } |
| 3108 | 3103 |
| 3109 void RenderFrameHostImpl::DeleteWebBluetoothService() { | 3104 void RenderFrameHostImpl::DeleteWebBluetoothService() { |
| 3110 web_bluetooth_service_.reset(); | 3105 web_bluetooth_service_.reset(); |
| 3111 } | 3106 } |
| 3112 | 3107 |
| 3113 } // namespace content | 3108 } // namespace content |
| OLD | NEW |