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

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

Issue 2611253004: [Payment Request] Change the lifetime management of PaymentRequestImpl (Closed)
Patch Set: PaymentRequestImpl -> PaymentRequest 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
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | chrome/browser/payments/chrome_payment_request_delegate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 #include "chrome/browser/field_trial_recorder.h" 51 #include "chrome/browser/field_trial_recorder.h"
52 #include "chrome/browser/font_family_cache.h" 52 #include "chrome/browser/font_family_cache.h"
53 #include "chrome/browser/media/webrtc/media_capture_devices_dispatcher.h" 53 #include "chrome/browser/media/webrtc/media_capture_devices_dispatcher.h"
54 #include "chrome/browser/memory/chrome_memory_coordinator_delegate.h" 54 #include "chrome/browser/memory/chrome_memory_coordinator_delegate.h"
55 #include "chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h" 55 #include "chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h"
56 #include "chrome/browser/nacl_host/nacl_browser_delegate_impl.h" 56 #include "chrome/browser/nacl_host/nacl_browser_delegate_impl.h"
57 #include "chrome/browser/net_benchmarking.h" 57 #include "chrome/browser/net_benchmarking.h"
58 #include "chrome/browser/notifications/platform_notification_service_impl.h" 58 #include "chrome/browser/notifications/platform_notification_service_impl.h"
59 #include "chrome/browser/page_load_metrics/metrics_navigation_throttle.h" 59 #include "chrome/browser/page_load_metrics/metrics_navigation_throttle.h"
60 #include "chrome/browser/password_manager/chrome_password_manager_client.h" 60 #include "chrome/browser/password_manager/chrome_password_manager_client.h"
61 #include "chrome/browser/payments/payment_request_impl.h"
62 #include "chrome/browser/permissions/permission_context_base.h" 61 #include "chrome/browser/permissions/permission_context_base.h"
63 #include "chrome/browser/platform_util.h" 62 #include "chrome/browser/platform_util.h"
64 #include "chrome/browser/prefs/preferences_connection_manager.h" 63 #include "chrome/browser/prefs/preferences_connection_manager.h"
65 #include "chrome/browser/prerender/prerender_final_status.h" 64 #include "chrome/browser/prerender/prerender_final_status.h"
66 #include "chrome/browser/prerender/prerender_manager.h" 65 #include "chrome/browser/prerender/prerender_manager.h"
67 #include "chrome/browser/prerender/prerender_manager_factory.h" 66 #include "chrome/browser/prerender/prerender_manager_factory.h"
68 #include "chrome/browser/prerender/prerender_message_filter.h" 67 #include "chrome/browser/prerender/prerender_message_filter.h"
69 #include "chrome/browser/printing/printing_message_filter.h" 68 #include "chrome/browser/printing/printing_message_filter.h"
70 #include "chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.h" 69 #include "chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.h"
71 #include "chrome/browser/profiles/profile.h" 70 #include "chrome/browser/profiles/profile.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 #include "components/content_settings/core/common/content_settings_types.h" 130 #include "components/content_settings/core/common/content_settings_types.h"
132 #include "components/dom_distiller/core/dom_distiller_switches.h" 131 #include "components/dom_distiller/core/dom_distiller_switches.h"
133 #include "components/dom_distiller/core/url_constants.h" 132 #include "components/dom_distiller/core/url_constants.h"
134 #include "components/error_page/common/error_page_switches.h" 133 #include "components/error_page/common/error_page_switches.h"
135 #include "components/google/core/browser/google_util.h" 134 #include "components/google/core/browser/google_util.h"
136 #include "components/metrics/call_stack_profile_collector.h" 135 #include "components/metrics/call_stack_profile_collector.h"
137 #include "components/metrics/client_info.h" 136 #include "components/metrics/client_info.h"
138 #include "components/nacl/common/nacl_constants.h" 137 #include "components/nacl/common/nacl_constants.h"
139 #include "components/net_log/chrome_net_log.h" 138 #include "components/net_log/chrome_net_log.h"
140 #include "components/password_manager/content/browser/content_password_manager_d river_factory.h" 139 #include "components/password_manager/content/browser/content_password_manager_d river_factory.h"
141 #include "components/payments/payment_request.mojom.h"
142 #include "components/pref_registry/pref_registry_syncable.h" 140 #include "components/pref_registry/pref_registry_syncable.h"
143 #include "components/prefs/pref_service.h" 141 #include "components/prefs/pref_service.h"
144 #include "components/prefs/scoped_user_pref_update.h" 142 #include "components/prefs/scoped_user_pref_update.h"
145 #include "components/rappor/public/rappor_utils.h" 143 #include "components/rappor/public/rappor_utils.h"
146 #include "components/rappor/rappor_recorder_impl.h" 144 #include "components/rappor/rappor_recorder_impl.h"
147 #include "components/rappor/rappor_service_impl.h" 145 #include "components/rappor/rappor_service_impl.h"
148 #include "components/safe_browsing_db/safe_browsing_prefs.h" 146 #include "components/safe_browsing_db/safe_browsing_prefs.h"
149 #include "components/security_interstitials/core/ssl_error_ui.h" 147 #include "components/security_interstitials/core/ssl_error_ui.h"
150 #include "components/signin/core/common/profile_management_switches.h" 148 #include "components/signin/core/common/profile_management_switches.h"
151 #include "components/spellcheck/spellcheck_build_features.h" 149 #include "components/spellcheck/spellcheck_build_features.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 #elif defined(OS_ANDROID) 243 #elif defined(OS_ANDROID)
246 #include "chrome/browser/chrome_browser_main_android.h" 244 #include "chrome/browser/chrome_browser_main_android.h"
247 #include "chrome/common/descriptors_android.h" 245 #include "chrome/common/descriptors_android.h"
248 #include "components/crash/content/browser/crash_dump_manager_android.h" 246 #include "components/crash/content/browser/crash_dump_manager_android.h"
249 #include "components/navigation_interception/intercept_navigation_delegate.h" 247 #include "components/navigation_interception/intercept_navigation_delegate.h"
250 #include "ui/base/resource/resource_bundle_android.h" 248 #include "ui/base/resource/resource_bundle_android.h"
251 #elif defined(OS_POSIX) 249 #elif defined(OS_POSIX)
252 #include "chrome/browser/chrome_browser_main_posix.h" 250 #include "chrome/browser/chrome_browser_main_posix.h"
253 #endif 251 #endif
254 252
253 #if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_WIN)
254 #include "chrome/browser/payments/payment_request_factory.h"
255 #endif
256
255 #if defined(OS_POSIX) && !defined(OS_MACOSX) 257 #if defined(OS_POSIX) && !defined(OS_MACOSX)
256 #include "base/debug/leak_annotations.h" 258 #include "base/debug/leak_annotations.h"
257 #include "components/crash/content/app/breakpad_linux.h" 259 #include "components/crash/content/app/breakpad_linux.h"
258 #include "components/crash/content/browser/crash_handler_host_linux.h" 260 #include "components/crash/content/browser/crash_handler_host_linux.h"
259 #endif 261 #endif
260 262
261 #if BUILDFLAG(ANDROID_JAVA_UI) 263 #if BUILDFLAG(ANDROID_JAVA_UI)
262 #include "chrome/browser/android/ntp/new_tab_page_url_handler.h" 264 #include "chrome/browser/android/ntp/new_tab_page_url_handler.h"
263 #include "chrome/browser/android/service_tab_launcher.h" 265 #include "chrome/browser/android/service_tab_launcher.h"
264 #include "chrome/browser/android/webapps/single_tab_mode_tab_helper.h" 266 #include "chrome/browser/android/webapps/single_tab_mode_tab_helper.h"
267 #include "components/payments/payment_request.mojom.h"
265 #include "content/public/browser/android/java_interfaces.h" 268 #include "content/public/browser/android/java_interfaces.h"
266 #endif 269 #endif
267 270
268 #if defined(OS_ANDROID) 271 #if defined(OS_ANDROID)
269 #include "chrome/browser/android/devtools_manager_delegate_android.h" 272 #include "chrome/browser/android/devtools_manager_delegate_android.h"
270 #include "ui/base/ui_base_paths.h" 273 #include "ui/base/ui_base_paths.h"
271 #include "ui/gfx/android/device_display_info.h" 274 #include "ui/gfx/android/device_display_info.h"
272 #else 275 #else
273 #include "chrome/browser/devtools/chrome_devtools_manager_delegate.h" 276 #include "chrome/browser/devtools/chrome_devtools_manager_delegate.h"
274 #endif 277 #endif
(...skipping 2731 matching lines...) Expand 10 before | Expand all | Expand 10 after
3006 content::WebContents::FromRenderFrameHost(render_frame_host); 3009 content::WebContents::FromRenderFrameHost(render_frame_host);
3007 if (web_contents) { 3010 if (web_contents) {
3008 registry->AddInterface( 3011 registry->AddInterface(
3009 web_contents->GetJavaInterfaces() 3012 web_contents->GetJavaInterfaces()
3010 ->CreateInterfaceFactory<payments::mojom::PaymentRequest>()); 3013 ->CreateInterfaceFactory<payments::mojom::PaymentRequest>());
3011 registry->AddInterface( 3014 registry->AddInterface(
3012 base::Bind(&ForwardShareServiceRequest, 3015 base::Bind(&ForwardShareServiceRequest,
3013 web_contents->GetJavaInterfaces()->GetWeakPtr())); 3016 web_contents->GetJavaInterfaces()->GetWeakPtr()));
3014 } 3017 }
3015 #elif defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_WIN) 3018 #elif defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_WIN)
3019 // TODO(crbug.com/679127): Enable for MacViews implementation.
3016 if (AreExperimentalWebPlatformFeaturesEnabled()) { 3020 if (AreExperimentalWebPlatformFeaturesEnabled()) {
3017 content::WebContents* web_contents = 3021 content::WebContents* web_contents =
3018 content::WebContents::FromRenderFrameHost(render_frame_host); 3022 content::WebContents::FromRenderFrameHost(render_frame_host);
3019 if (web_contents) { 3023 if (web_contents) {
3020 registry->AddInterface( 3024 registry->AddInterface(base::Bind(
3021 base::Bind(CreatePaymentRequestHandler, web_contents)); 3025 payments::CreatePaymentRequestForWebContents, web_contents));
3022 } 3026 }
3023 } 3027 }
3024 #endif 3028 #endif
3025 3029
3026 #if defined(OS_ANDROID) 3030 #if defined(OS_ANDROID)
3027 if (AreExperimentalWebPlatformFeaturesEnabled()) { 3031 if (AreExperimentalWebPlatformFeaturesEnabled()) {
3028 content::WebContents* web_contents = 3032 content::WebContents* web_contents =
3029 content::WebContents::FromRenderFrameHost(render_frame_host); 3033 content::WebContents::FromRenderFrameHost(render_frame_host);
3030 if (web_contents) { 3034 if (web_contents) {
3031 registry->AddInterface( 3035 registry->AddInterface(
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
3362 bool ChromeContentBrowserClient::ShouldRedirectDOMStorageTaskRunner() { 3366 bool ChromeContentBrowserClient::ShouldRedirectDOMStorageTaskRunner() {
3363 return variations::GetVariationParamValue( 3367 return variations::GetVariationParamValue(
3364 "BrowserScheduler", "RedirectDOMStorageTaskRunner") == "true"; 3368 "BrowserScheduler", "RedirectDOMStorageTaskRunner") == "true";
3365 } 3369 }
3366 3370
3367 bool ChromeContentBrowserClient:: 3371 bool ChromeContentBrowserClient::
3368 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { 3372 RedirectNonUINonIOBrowserThreadsToTaskScheduler() {
3369 return variations::GetVariationParamValue( 3373 return variations::GetVariationParamValue(
3370 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; 3374 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true";
3371 } 3375 }
OLDNEW
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | chrome/browser/payments/chrome_payment_request_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698