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

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

Issue 2620083002: Shape Detection: Move mojom interface to //services (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « chrome/browser/DEPS ('k') | chrome/browser/chrome_content_browser_manifest_overlay.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 #include "net/cookies/cookie_options.h" 195 #include "net/cookies/cookie_options.h"
196 #include "net/ssl/ssl_cert_request_info.h" 196 #include "net/ssl/ssl_cert_request_info.h"
197 #include "ppapi/features/features.h" 197 #include "ppapi/features/features.h"
198 #include "ppapi/host/ppapi_host.h" 198 #include "ppapi/host/ppapi_host.h"
199 #include "printing/features/features.h" 199 #include "printing/features/features.h"
200 #include "services/image_decoder/public/interfaces/constants.mojom.h" 200 #include "services/image_decoder/public/interfaces/constants.mojom.h"
201 #include "services/preferences/public/interfaces/preferences.mojom.h" 201 #include "services/preferences/public/interfaces/preferences.mojom.h"
202 #include "services/service_manager/public/cpp/interface_provider.h" 202 #include "services/service_manager/public/cpp/interface_provider.h"
203 #include "services/service_manager/public/cpp/interface_registry.h" 203 #include "services/service_manager/public/cpp/interface_registry.h"
204 #include "services/service_manager/public/cpp/service.h" 204 #include "services/service_manager/public/cpp/service.h"
205 #include "services/shape_detection/public/interfaces/barcodedetection.mojom.h"
206 #include "services/shape_detection/public/interfaces/textdetection.mojom.h"
205 #include "storage/browser/fileapi/external_mount_points.h" 207 #include "storage/browser/fileapi/external_mount_points.h"
206 #include "third_party/WebKit/public/platform/modules/shapedetection/barcodedetec tion.mojom.h"
207 #include "third_party/WebKit/public/platform/modules/shapedetection/textdetectio n.mojom.h"
208 #include "third_party/WebKit/public/platform/modules/webshare/webshare.mojom.h" 208 #include "third_party/WebKit/public/platform/modules/webshare/webshare.mojom.h"
209 #include "ui/base/l10n/l10n_util.h" 209 #include "ui/base/l10n/l10n_util.h"
210 #include "ui/base/resource/resource_bundle.h" 210 #include "ui/base/resource/resource_bundle.h"
211 #include "ui/resources/grit/ui_resources.h" 211 #include "ui/resources/grit/ui_resources.h"
212 #include "url/gurl.h" 212 #include "url/gurl.h"
213 #include "url/origin.h" 213 #include "url/origin.h"
214 214
215 #if defined(OS_WIN) 215 #if defined(OS_WIN)
216 #include "base/strings/string_tokenizer.h" 216 #include "base/strings/string_tokenizer.h"
217 #include "chrome/browser/chrome_browser_main_win.h" 217 #include "chrome/browser/chrome_browser_main_win.h"
(...skipping 2779 matching lines...) Expand 10 before | Expand all | Expand 10 after
2997 if (web_contents) { 2997 if (web_contents) {
2998 registry->AddInterface( 2998 registry->AddInterface(
2999 web_contents->GetJavaInterfaces() 2999 web_contents->GetJavaInterfaces()
3000 ->CreateInterfaceFactory<payments::mojom::PaymentRequest>()); 3000 ->CreateInterfaceFactory<payments::mojom::PaymentRequest>());
3001 registry->AddInterface( 3001 registry->AddInterface(
3002 base::Bind(&ForwardShareServiceRequest, 3002 base::Bind(&ForwardShareServiceRequest,
3003 web_contents->GetJavaInterfaces()->GetWeakPtr())); 3003 web_contents->GetJavaInterfaces()->GetWeakPtr()));
3004 if (AreExperimentalWebPlatformFeaturesEnabled()) { 3004 if (AreExperimentalWebPlatformFeaturesEnabled()) {
3005 registry->AddInterface( 3005 registry->AddInterface(
3006 web_contents->GetJavaInterfaces() 3006 web_contents->GetJavaInterfaces()
3007 ->CreateInterfaceFactory<blink::mojom::BarcodeDetection>()); 3007 ->CreateInterfaceFactory<
3008 shape_detection::mojom::BarcodeDetection>());
3009 registry->AddInterface(web_contents->GetJavaInterfaces()
3010 ->CreateInterfaceFactory<
3011 shape_detection::mojom::TextDetection>());
mcasas 2017/01/10 22:20:32 TextDetection registration is already in ToT. Wron
3008 } 3012 }
3009 } 3013 }
3010 #elif defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_WIN) 3014 #elif defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_WIN)
3011 // TODO(crbug.com/679127): Enable for MacViews implementation. 3015 // TODO(crbug.com/679127): Enable for MacViews implementation.
3012 if (AreExperimentalWebPlatformFeaturesEnabled()) { 3016 if (AreExperimentalWebPlatformFeaturesEnabled()) {
3013 content::WebContents* web_contents = 3017 content::WebContents* web_contents =
3014 content::WebContents::FromRenderFrameHost(render_frame_host); 3018 content::WebContents::FromRenderFrameHost(render_frame_host);
3015 if (web_contents) { 3019 if (web_contents) {
3016 registry->AddInterface(base::Bind( 3020 registry->AddInterface(base::Bind(
3017 payments::CreatePaymentRequestForWebContents, web_contents)); 3021 payments::CreatePaymentRequestForWebContents, web_contents));
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
3346 bool ChromeContentBrowserClient::ShouldRedirectDOMStorageTaskRunner() { 3350 bool ChromeContentBrowserClient::ShouldRedirectDOMStorageTaskRunner() {
3347 return variations::GetVariationParamValue( 3351 return variations::GetVariationParamValue(
3348 "BrowserScheduler", "RedirectDOMStorageTaskRunner") == "true"; 3352 "BrowserScheduler", "RedirectDOMStorageTaskRunner") == "true";
3349 } 3353 }
3350 3354
3351 bool ChromeContentBrowserClient:: 3355 bool ChromeContentBrowserClient::
3352 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { 3356 RedirectNonUINonIOBrowserThreadsToTaskScheduler() {
3353 return variations::GetVariationParamValue( 3357 return variations::GetVariationParamValue(
3354 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; 3358 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true";
3355 } 3359 }
OLDNEW
« no previous file with comments | « chrome/browser/DEPS ('k') | chrome/browser/chrome_content_browser_manifest_overlay.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698