| 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 3152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3163 content::WebContents::FromRenderFrameHost(render_frame_host); | 3163 content::WebContents::FromRenderFrameHost(render_frame_host); |
| 3164 if (web_contents) { | 3164 if (web_contents) { |
| 3165 registry->AddInterface( | 3165 registry->AddInterface( |
| 3166 web_contents->GetJavaInterfaces() | 3166 web_contents->GetJavaInterfaces() |
| 3167 ->CreateInterfaceFactory<payments::mojom::PaymentRequest>()); | 3167 ->CreateInterfaceFactory<payments::mojom::PaymentRequest>()); |
| 3168 registry->AddInterface( | 3168 registry->AddInterface( |
| 3169 base::Bind(&ForwardShareServiceRequest, | 3169 base::Bind(&ForwardShareServiceRequest, |
| 3170 web_contents->GetJavaInterfaces()->GetWeakPtr())); | 3170 web_contents->GetJavaInterfaces()->GetWeakPtr())); |
| 3171 } | 3171 } |
| 3172 #else | 3172 #else |
| 3173 if (AreExperimentalWebPlatformFeaturesEnabled()) { | 3173 if (AreExperimentalWebPlatformFeaturesEnabled() && |
| 3174 base::FeatureList::IsEnabled(features::kWebPayments)) { |
| 3174 content::WebContents* web_contents = | 3175 content::WebContents* web_contents = |
| 3175 content::WebContents::FromRenderFrameHost(render_frame_host); | 3176 content::WebContents::FromRenderFrameHost(render_frame_host); |
| 3176 if (web_contents) { | 3177 if (web_contents) { |
| 3177 registry->AddInterface(base::Bind( | 3178 registry->AddInterface(base::Bind( |
| 3178 payments::CreatePaymentRequestForWebContents, web_contents)); | 3179 payments::CreatePaymentRequestForWebContents, web_contents)); |
| 3179 } | 3180 } |
| 3180 } | 3181 } |
| 3181 #endif | 3182 #endif |
| 3182 | 3183 |
| 3183 #if defined(OS_LINUX) || defined(OS_WIN) | 3184 #if defined(OS_LINUX) || defined(OS_WIN) |
| (...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3544 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { | 3545 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { |
| 3545 return variations::GetVariationParamValue( | 3546 return variations::GetVariationParamValue( |
| 3546 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; | 3547 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; |
| 3547 } | 3548 } |
| 3548 | 3549 |
| 3549 // static | 3550 // static |
| 3550 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( | 3551 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( |
| 3551 const storage::QuotaSettings* settings) { | 3552 const storage::QuotaSettings* settings) { |
| 3552 g_default_quota_settings = settings; | 3553 g_default_quota_settings = settings; |
| 3553 } | 3554 } |
| OLD | NEW |