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

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

Issue 2399593005: ShapeDetectionImpl: Android implementation of detectFace() (Closed)
Patch Set: ShapeDetectionImpl: Added explanation on bitmap. 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 2051 matching lines...) Expand 10 before | Expand all | Expand 10 after
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(
2165 GetGlobalJavaInterfaces() 2166 GetGlobalJavaInterfaces()
2166 ->CreateInterfaceFactory<device::VibrationManager>()); 2167 ->CreateInterfaceFactory<device::VibrationManager>());
2168
2169 GetInterfaceRegistry()->AddInterface(
2170 GetGlobalJavaInterfaces()
2171 ->CreateInterfaceFactory<blink::mojom::ShapeDetection>());
mcasas 2016/10/11 23:04:48 nit: move this before l.2165, so the VibrationMana
xianglu 2016/10/12 18:25:17 Done.
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)
2175 enable_web_bluetooth = true; 2180 enable_web_bluetooth = true;
2176 #endif 2181 #endif
(...skipping 930 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698