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

Side by Side Diff: chrome/browser/chrome_content_browser_client.cc

Issue 2512123002: Shape Detection: QR detection in Chrome Android using Play Services (Closed)
Patch Set: Created 4 years 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/chrome_content_browser_client.h" 5 #include "chrome/browser/chrome_content_browser_client.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 #include "net/cookies/cookie_options.h" 186 #include "net/cookies/cookie_options.h"
187 #include "net/ssl/ssl_cert_request_info.h" 187 #include "net/ssl/ssl_cert_request_info.h"
188 #include "ppapi/features/features.h" 188 #include "ppapi/features/features.h"
189 #include "ppapi/host/ppapi_host.h" 189 #include "ppapi/host/ppapi_host.h"
190 #include "printing/features/features.h" 190 #include "printing/features/features.h"
191 #include "services/image_decoder/public/interfaces/constants.mojom.h" 191 #include "services/image_decoder/public/interfaces/constants.mojom.h"
192 #include "services/service_manager/public/cpp/interface_provider.h" 192 #include "services/service_manager/public/cpp/interface_provider.h"
193 #include "services/service_manager/public/cpp/interface_registry.h" 193 #include "services/service_manager/public/cpp/interface_registry.h"
194 #include "services/service_manager/public/cpp/service.h" 194 #include "services/service_manager/public/cpp/service.h"
195 #include "storage/browser/fileapi/external_mount_points.h" 195 #include "storage/browser/fileapi/external_mount_points.h"
196 #include "third_party/WebKit/public/platform/modules/shapedetection/barcodedetec tion.mojom.h"
196 #include "third_party/WebKit/public/platform/modules/webshare/webshare.mojom.h" 197 #include "third_party/WebKit/public/platform/modules/webshare/webshare.mojom.h"
197 #include "ui/base/l10n/l10n_util.h" 198 #include "ui/base/l10n/l10n_util.h"
198 #include "ui/base/resource/resource_bundle.h" 199 #include "ui/base/resource/resource_bundle.h"
199 #include "ui/resources/grit/ui_resources.h" 200 #include "ui/resources/grit/ui_resources.h"
200 #include "url/gurl.h" 201 #include "url/gurl.h"
201 #include "url/origin.h" 202 #include "url/origin.h"
202 203
203 #if defined(OS_WIN) 204 #if defined(OS_WIN)
204 #include "base/strings/string_tokenizer.h" 205 #include "base/strings/string_tokenizer.h"
205 #include "chrome/browser/chrome_browser_main_win.h" 206 #include "chrome/browser/chrome_browser_main_win.h"
(...skipping 2814 matching lines...) Expand 10 before | Expand all | Expand 10 after
3020 #elif defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_WIN) 3021 #elif defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_WIN)
3021 if (AreExperimentalWebPlatformFeaturesEnabled()) { 3022 if (AreExperimentalWebPlatformFeaturesEnabled()) {
3022 content::WebContents* web_contents = 3023 content::WebContents* web_contents =
3023 content::WebContents::FromRenderFrameHost(render_frame_host); 3024 content::WebContents::FromRenderFrameHost(render_frame_host);
3024 if (web_contents) { 3025 if (web_contents) {
3025 registry->AddInterface( 3026 registry->AddInterface(
3026 base::Bind(CreatePaymentRequestHandler, web_contents)); 3027 base::Bind(CreatePaymentRequestHandler, web_contents));
3027 } 3028 }
3028 } 3029 }
3029 #endif 3030 #endif
3031
3032 #if defined(OS_ANDROID)
3033 registry->AddInterface(
3034 web_contents->GetJavaInterfaces()
3035 ->CreateInterfaceFactory<blink::mojom::BarcodeDetection>());
3036 #endif
3037
3030 } 3038 }
3031 3039
3032 void ChromeContentBrowserClient::ExposeInterfacesToGpuProcess( 3040 void ChromeContentBrowserClient::ExposeInterfacesToGpuProcess(
3033 service_manager::InterfaceRegistry* registry, 3041 service_manager::InterfaceRegistry* registry,
3034 content::GpuProcessHost* render_process_host) { 3042 content::GpuProcessHost* render_process_host) {
3035 registry->AddInterface( 3043 registry->AddInterface(
3036 base::Bind(&metrics::CallStackProfileCollector::Create, 3044 base::Bind(&metrics::CallStackProfileCollector::Create,
3037 metrics::CallStackProfileParams::GPU_PROCESS)); 3045 metrics::CallStackProfileParams::GPU_PROCESS));
3038 } 3046 }
3039 3047
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
3299 render_frame_host, std::move(source), std::move(request)); 3307 render_frame_host, std::move(source), std::move(request));
3300 #else 3308 #else
3301 // Chrome's media remoting implementation depends on the Media Router 3309 // Chrome's media remoting implementation depends on the Media Router
3302 // infrastructure to identify remote sinks and provide the user interface for 3310 // infrastructure to identify remote sinks and provide the user interface for
3303 // sink selection. In the case where the Media Router is not present, simply 3311 // sink selection. In the case where the Media Router is not present, simply
3304 // drop the interface request. This will prevent code paths for media remoting 3312 // drop the interface request. This will prevent code paths for media remoting
3305 // in the renderer process from activating. 3313 // in the renderer process from activating.
3306 #endif 3314 #endif
3307 } 3315 }
3308 #endif // BUILDFLAG(ENABLE_MEDIA_REMOTING) 3316 #endif // BUILDFLAG(ENABLE_MEDIA_REMOTING)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698