| 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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 #include "ppapi/features/features.h" | 196 #include "ppapi/features/features.h" |
| 197 #include "ppapi/host/ppapi_host.h" | 197 #include "ppapi/host/ppapi_host.h" |
| 198 #include "printing/features/features.h" | 198 #include "printing/features/features.h" |
| 199 #include "services/image_decoder/public/interfaces/constants.mojom.h" | 199 #include "services/image_decoder/public/interfaces/constants.mojom.h" |
| 200 #include "services/preferences/public/interfaces/preferences.mojom.h" | 200 #include "services/preferences/public/interfaces/preferences.mojom.h" |
| 201 #include "services/service_manager/public/cpp/interface_provider.h" | 201 #include "services/service_manager/public/cpp/interface_provider.h" |
| 202 #include "services/service_manager/public/cpp/interface_registry.h" | 202 #include "services/service_manager/public/cpp/interface_registry.h" |
| 203 #include "services/service_manager/public/cpp/service.h" | 203 #include "services/service_manager/public/cpp/service.h" |
| 204 #include "storage/browser/fileapi/external_mount_points.h" | 204 #include "storage/browser/fileapi/external_mount_points.h" |
| 205 #include "third_party/WebKit/public/platform/modules/shapedetection/barcodedetec
tion.mojom.h" | 205 #include "third_party/WebKit/public/platform/modules/shapedetection/barcodedetec
tion.mojom.h" |
| 206 #include "third_party/WebKit/public/platform/modules/shapedetection/textdetectio
n.mojom.h" |
| 206 #include "third_party/WebKit/public/platform/modules/webshare/webshare.mojom.h" | 207 #include "third_party/WebKit/public/platform/modules/webshare/webshare.mojom.h" |
| 207 #include "ui/base/l10n/l10n_util.h" | 208 #include "ui/base/l10n/l10n_util.h" |
| 208 #include "ui/base/resource/resource_bundle.h" | 209 #include "ui/base/resource/resource_bundle.h" |
| 209 #include "ui/resources/grit/ui_resources.h" | 210 #include "ui/resources/grit/ui_resources.h" |
| 210 #include "url/gurl.h" | 211 #include "url/gurl.h" |
| 211 #include "url/origin.h" | 212 #include "url/origin.h" |
| 212 | 213 |
| 213 #if defined(OS_WIN) | 214 #if defined(OS_WIN) |
| 214 #include "base/strings/string_tokenizer.h" | 215 #include "base/strings/string_tokenizer.h" |
| 215 #include "chrome/browser/chrome_browser_main_win.h" | 216 #include "chrome/browser/chrome_browser_main_win.h" |
| (...skipping 2822 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3038 #endif | 3039 #endif |
| 3039 | 3040 |
| 3040 #if defined(OS_ANDROID) | 3041 #if defined(OS_ANDROID) |
| 3041 if (AreExperimentalWebPlatformFeaturesEnabled()) { | 3042 if (AreExperimentalWebPlatformFeaturesEnabled()) { |
| 3042 content::WebContents* web_contents = | 3043 content::WebContents* web_contents = |
| 3043 content::WebContents::FromRenderFrameHost(render_frame_host); | 3044 content::WebContents::FromRenderFrameHost(render_frame_host); |
| 3044 if (web_contents) { | 3045 if (web_contents) { |
| 3045 registry->AddInterface( | 3046 registry->AddInterface( |
| 3046 web_contents->GetJavaInterfaces() | 3047 web_contents->GetJavaInterfaces() |
| 3047 ->CreateInterfaceFactory<blink::mojom::BarcodeDetection>()); | 3048 ->CreateInterfaceFactory<blink::mojom::BarcodeDetection>()); |
| 3049 registry->AddInterface( |
| 3050 web_contents->GetJavaInterfaces() |
| 3051 ->CreateInterfaceFactory<blink::mojom::TextDetection>()); |
| 3048 } | 3052 } |
| 3049 } | 3053 } |
| 3050 #endif | 3054 #endif |
| 3051 | 3055 |
| 3052 #if defined(OS_LINUX) || defined(OS_WIN) | 3056 #if defined(OS_LINUX) || defined(OS_WIN) |
| 3053 if (!ChromeOriginTrialPolicy().IsFeatureDisabled("WebShare")) { | 3057 if (!ChromeOriginTrialPolicy().IsFeatureDisabled("WebShare")) { |
| 3054 registry->AddInterface(base::Bind(&ShareServiceImpl::Create)); | 3058 registry->AddInterface(base::Bind(&ShareServiceImpl::Create)); |
| 3055 } | 3059 } |
| 3056 #endif | 3060 #endif |
| 3057 } | 3061 } |
| (...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3376 bool ChromeContentBrowserClient::ShouldRedirectDOMStorageTaskRunner() { | 3380 bool ChromeContentBrowserClient::ShouldRedirectDOMStorageTaskRunner() { |
| 3377 return variations::GetVariationParamValue( | 3381 return variations::GetVariationParamValue( |
| 3378 "BrowserScheduler", "RedirectDOMStorageTaskRunner") == "true"; | 3382 "BrowserScheduler", "RedirectDOMStorageTaskRunner") == "true"; |
| 3379 } | 3383 } |
| 3380 | 3384 |
| 3381 bool ChromeContentBrowserClient:: | 3385 bool ChromeContentBrowserClient:: |
| 3382 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { | 3386 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { |
| 3383 return variations::GetVariationParamValue( | 3387 return variations::GetVariationParamValue( |
| 3384 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; | 3388 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; |
| 3385 } | 3389 } |
| OLD | NEW |