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

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

Issue 2399593005: ShapeDetectionImpl: Android implementation of detectFace() (Closed)
Patch Set: Reorder alphabetically 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 #include "content/public/common/service_manager_connection.h" 89 #include "content/public/common/service_manager_connection.h"
90 #include "content/public/common/url_constants.h" 90 #include "content/public/common/url_constants.h"
91 #include "content/public/common/url_utils.h" 91 #include "content/public/common/url_utils.h"
92 #include "device/generic_sensor/sensor_provider_impl.h" 92 #include "device/generic_sensor/sensor_provider_impl.h"
93 #include "device/geolocation/geolocation_service_context.h" 93 #include "device/geolocation/geolocation_service_context.h"
94 #include "device/vibration/vibration_manager_impl.h" 94 #include "device/vibration/vibration_manager_impl.h"
95 #include "device/wake_lock/wake_lock_service_context.h" 95 #include "device/wake_lock/wake_lock_service_context.h"
96 #include "media/mojo/interfaces/media_service.mojom.h" 96 #include "media/mojo/interfaces/media_service.mojom.h"
97 #include "media/mojo/interfaces/service_factory.mojom.h" 97 #include "media/mojo/interfaces/service_factory.mojom.h"
98 #include "mojo/public/cpp/bindings/associated_interface_ptr.h" 98 #include "mojo/public/cpp/bindings/associated_interface_ptr.h"
99 #include "public/platform/modules/shapedetection/shapedetection.mojom.h"
99 #include "services/shell/public/cpp/connector.h" 100 #include "services/shell/public/cpp/connector.h"
100 #include "services/shell/public/cpp/interface_provider.h" 101 #include "services/shell/public/cpp/interface_provider.h"
101 #include "ui/accessibility/ax_tree.h" 102 #include "ui/accessibility/ax_tree.h"
102 #include "ui/accessibility/ax_tree_update.h" 103 #include "ui/accessibility/ax_tree_update.h"
103 #include "ui/gfx/geometry/quad_f.h" 104 #include "ui/gfx/geometry/quad_f.h"
104 #include "url/gurl.h" 105 #include "url/gurl.h"
105 106
106 #if defined(OS_ANDROID) 107 #if defined(OS_ANDROID)
107 #include "content/browser/android/app_web_message_port_message_filter.h" 108 #include "content/browser/android/app_web_message_port_message_filter.h"
108 #include "content/public/browser/android/java_interfaces.h" 109 #include "content/public/browser/android/java_interfaces.h"
(...skipping 2070 matching lines...) Expand 10 before | Expand all | Expand 10 after
2179 2180
2180 GetInterfaceRegistry()->AddInterface(base::Bind( 2181 GetInterfaceRegistry()->AddInterface(base::Bind(
2181 &PresentationServiceImpl::CreateMojoService, base::Unretained(this))); 2182 &PresentationServiceImpl::CreateMojoService, base::Unretained(this)));
2182 2183
2183 GetInterfaceRegistry()->AddInterface( 2184 GetInterfaceRegistry()->AddInterface(
2184 base::Bind(&MediaSessionServiceImpl::Create, base::Unretained(this))); 2185 base::Bind(&MediaSessionServiceImpl::Create, base::Unretained(this)));
2185 2186
2186 #if defined(OS_ANDROID) 2187 #if defined(OS_ANDROID)
2187 GetInterfaceRegistry()->AddInterface( 2188 GetInterfaceRegistry()->AddInterface(
2188 GetGlobalJavaInterfaces() 2189 GetGlobalJavaInterfaces()
2190 ->CreateInterfaceFactory<blink::mojom::ShapeDetection>());
ncarter (slow) 2016/10/12 20:08:35 Is it possible to only do AddInterface if the flag
xianglu 2016/10/13 00:02:32 There is a flag in Blink https://cs.chromium.org/c
2191
2192 GetInterfaceRegistry()->AddInterface(
2193 GetGlobalJavaInterfaces()
2189 ->CreateInterfaceFactory<device::VibrationManager>()); 2194 ->CreateInterfaceFactory<device::VibrationManager>());
2190 #else 2195 #else
2191 GetInterfaceRegistry()->AddInterface( 2196 GetInterfaceRegistry()->AddInterface(
2192 base::Bind(&device::VibrationManagerImpl::Create)); 2197 base::Bind(&device::VibrationManagerImpl::Create));
2193 #endif 2198 #endif
2194 2199
2195 bool enable_web_bluetooth = base::CommandLine::ForCurrentProcess()->HasSwitch( 2200 bool enable_web_bluetooth = base::CommandLine::ForCurrentProcess()->HasSwitch(
2196 switches::kEnableWebBluetooth); 2201 switches::kEnableWebBluetooth);
2197 #if defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_MACOSX) 2202 #if defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_MACOSX)
2198 enable_web_bluetooth = true; 2203 enable_web_bluetooth = true;
(...skipping 954 matching lines...) Expand 10 before | Expand all | Expand 10 after
3153 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( 3158 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind(
3154 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); 3159 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this)));
3155 return web_bluetooth_service_.get(); 3160 return web_bluetooth_service_.get();
3156 } 3161 }
3157 3162
3158 void RenderFrameHostImpl::DeleteWebBluetoothService() { 3163 void RenderFrameHostImpl::DeleteWebBluetoothService() {
3159 web_bluetooth_service_.reset(); 3164 web_bluetooth_service_.reset();
3160 } 3165 }
3161 3166
3162 } // namespace content 3167 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698