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

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

Issue 2588293005: Shape Detection: Add Text Detection in Chrome Android (Closed)
Patch Set: 2016=>2017 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
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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 "storage/browser/fileapi/external_mount_points.h" 205 #include "storage/browser/fileapi/external_mount_points.h"
206 #include "third_party/WebKit/public/platform/modules/shapedetection/barcodedetec tion.mojom.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"
207 #include "third_party/WebKit/public/platform/modules/webshare/webshare.mojom.h" 208 #include "third_party/WebKit/public/platform/modules/webshare/webshare.mojom.h"
208 #include "ui/base/l10n/l10n_util.h" 209 #include "ui/base/l10n/l10n_util.h"
209 #include "ui/base/resource/resource_bundle.h" 210 #include "ui/base/resource/resource_bundle.h"
210 #include "ui/resources/grit/ui_resources.h" 211 #include "ui/resources/grit/ui_resources.h"
211 #include "url/gurl.h" 212 #include "url/gurl.h"
212 #include "url/origin.h" 213 #include "url/origin.h"
213 214
214 #if defined(OS_WIN) 215 #if defined(OS_WIN)
215 #include "base/strings/string_tokenizer.h" 216 #include "base/strings/string_tokenizer.h"
216 #include "chrome/browser/chrome_browser_main_win.h" 217 #include "chrome/browser/chrome_browser_main_win.h"
(...skipping 2815 matching lines...) Expand 10 before | Expand all | Expand 10 after
3032 #endif 3033 #endif
3033 3034
3034 #if defined(OS_ANDROID) 3035 #if defined(OS_ANDROID)
3035 if (AreExperimentalWebPlatformFeaturesEnabled()) { 3036 if (AreExperimentalWebPlatformFeaturesEnabled()) {
3036 content::WebContents* web_contents = 3037 content::WebContents* web_contents =
3037 content::WebContents::FromRenderFrameHost(render_frame_host); 3038 content::WebContents::FromRenderFrameHost(render_frame_host);
3038 if (web_contents) { 3039 if (web_contents) {
3039 registry->AddInterface( 3040 registry->AddInterface(
3040 web_contents->GetJavaInterfaces() 3041 web_contents->GetJavaInterfaces()
3041 ->CreateInterfaceFactory<blink::mojom::BarcodeDetection>()); 3042 ->CreateInterfaceFactory<blink::mojom::BarcodeDetection>());
3043 registry->AddInterface(
3044 web_contents->GetJavaInterfaces()
3045 ->CreateInterfaceFactory<blink::mojom::TextDetection>());
3042 } 3046 }
3043 } 3047 }
3044 #endif 3048 #endif
3045 3049
3046 #if defined(OS_LINUX) || defined(OS_WIN) 3050 #if defined(OS_LINUX) || defined(OS_WIN)
3047 if (!ChromeOriginTrialPolicy().IsFeatureDisabled("WebShare")) { 3051 if (!ChromeOriginTrialPolicy().IsFeatureDisabled("WebShare")) {
3048 registry->AddInterface(base::Bind(&ShareServiceImpl::Create)); 3052 registry->AddInterface(base::Bind(&ShareServiceImpl::Create));
3049 } 3053 }
3050 #endif 3054 #endif
3051 } 3055 }
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
3370 bool ChromeContentBrowserClient::ShouldRedirectDOMStorageTaskRunner() { 3374 bool ChromeContentBrowserClient::ShouldRedirectDOMStorageTaskRunner() {
3371 return variations::GetVariationParamValue( 3375 return variations::GetVariationParamValue(
3372 "BrowserScheduler", "RedirectDOMStorageTaskRunner") == "true"; 3376 "BrowserScheduler", "RedirectDOMStorageTaskRunner") == "true";
3373 } 3377 }
3374 3378
3375 bool ChromeContentBrowserClient:: 3379 bool ChromeContentBrowserClient::
3376 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { 3380 RedirectNonUINonIOBrowserThreadsToTaskScheduler() {
3377 return variations::GetVariationParamValue( 3381 return variations::GetVariationParamValue(
3378 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; 3382 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true";
3379 } 3383 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698