| OLD | NEW |
| 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 Loading... |
| 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 2820 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3037 #endif | 3038 #endif |
| 3038 | 3039 |
| 3039 #if defined(OS_ANDROID) | 3040 #if defined(OS_ANDROID) |
| 3040 if (AreExperimentalWebPlatformFeaturesEnabled()) { | 3041 if (AreExperimentalWebPlatformFeaturesEnabled()) { |
| 3041 content::WebContents* web_contents = | 3042 content::WebContents* web_contents = |
| 3042 content::WebContents::FromRenderFrameHost(render_frame_host); | 3043 content::WebContents::FromRenderFrameHost(render_frame_host); |
| 3043 if (web_contents) { | 3044 if (web_contents) { |
| 3044 registry->AddInterface( | 3045 registry->AddInterface( |
| 3045 web_contents->GetJavaInterfaces() | 3046 web_contents->GetJavaInterfaces() |
| 3046 ->CreateInterfaceFactory<blink::mojom::BarcodeDetection>()); | 3047 ->CreateInterfaceFactory<blink::mojom::BarcodeDetection>()); |
| 3048 registry->AddInterface( |
| 3049 web_contents->GetJavaInterfaces() |
| 3050 ->CreateInterfaceFactory<blink::mojom::TextDetection>()); |
| 3047 } | 3051 } |
| 3048 } | 3052 } |
| 3049 #endif | 3053 #endif |
| 3050 | 3054 |
| 3051 #if defined(OS_LINUX) || defined(OS_WIN) | 3055 #if defined(OS_LINUX) || defined(OS_WIN) |
| 3052 if (!ChromeOriginTrialPolicy().IsFeatureDisabled("WebShare")) { | 3056 if (!ChromeOriginTrialPolicy().IsFeatureDisabled("WebShare")) { |
| 3053 registry->AddInterface(base::Bind(&ShareServiceImpl::Create)); | 3057 registry->AddInterface(base::Bind(&ShareServiceImpl::Create)); |
| 3054 } | 3058 } |
| 3055 #endif | 3059 #endif |
| 3056 } | 3060 } |
| (...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3375 bool ChromeContentBrowserClient::ShouldRedirectDOMStorageTaskRunner() { | 3379 bool ChromeContentBrowserClient::ShouldRedirectDOMStorageTaskRunner() { |
| 3376 return variations::GetVariationParamValue( | 3380 return variations::GetVariationParamValue( |
| 3377 "BrowserScheduler", "RedirectDOMStorageTaskRunner") == "true"; | 3381 "BrowserScheduler", "RedirectDOMStorageTaskRunner") == "true"; |
| 3378 } | 3382 } |
| 3379 | 3383 |
| 3380 bool ChromeContentBrowserClient:: | 3384 bool ChromeContentBrowserClient:: |
| 3381 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { | 3385 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { |
| 3382 return variations::GetVariationParamValue( | 3386 return variations::GetVariationParamValue( |
| 3383 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; | 3387 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; |
| 3384 } | 3388 } |
| OLD | NEW |