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