Chromium Code Reviews| 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 93 #include "chrome/browser/ui/browser_navigator_params.h" | 93 #include "chrome/browser/ui/browser_navigator_params.h" |
| 94 #include "chrome/browser/ui/chrome_select_file_policy.h" | 94 #include "chrome/browser/ui/chrome_select_file_policy.h" |
| 95 #include "chrome/browser/ui/sync/sync_promo_ui.h" | 95 #include "chrome/browser/ui/sync/sync_promo_ui.h" |
| 96 #include "chrome/browser/ui/tab_contents/chrome_web_contents_view_delegate.h" | 96 #include "chrome/browser/ui/tab_contents/chrome_web_contents_view_delegate.h" |
| 97 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h" | 97 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h" |
| 98 #include "chrome/browser/ui/webui/log_web_ui_url.h" | 98 #include "chrome/browser/ui/webui/log_web_ui_url.h" |
| 99 #include "chrome/browser/usb/usb_tab_helper.h" | 99 #include "chrome/browser/usb/usb_tab_helper.h" |
| 100 #include "chrome/browser/webshare/share_service_impl.h" | 100 #include "chrome/browser/webshare/share_service_impl.h" |
| 101 #include "chrome/common/channel_info.h" | 101 #include "chrome/common/channel_info.h" |
| 102 #include "chrome/common/chrome_constants.h" | 102 #include "chrome/common/chrome_constants.h" |
| 103 #include "chrome/common/chrome_features.h" | |
| 103 #include "chrome/common/chrome_paths.h" | 104 #include "chrome/common/chrome_paths.h" |
| 104 #include "chrome/common/chrome_switches.h" | 105 #include "chrome/common/chrome_switches.h" |
| 105 #include "chrome/common/env_vars.h" | 106 #include "chrome/common/env_vars.h" |
| 106 #include "chrome/common/features.h" | 107 #include "chrome/common/features.h" |
| 107 #include "chrome/common/logging_chrome.h" | 108 #include "chrome/common/logging_chrome.h" |
| 108 #include "chrome/common/origin_trials/chrome_origin_trial_policy.h" | 109 #include "chrome/common/origin_trials/chrome_origin_trial_policy.h" |
| 109 #include "chrome/common/pepper_permission_util.h" | 110 #include "chrome/common/pepper_permission_util.h" |
| 110 #include "chrome/common/pref_names.h" | 111 #include "chrome/common/pref_names.h" |
| 111 #include "chrome/common/render_messages.h" | 112 #include "chrome/common/render_messages.h" |
| 112 #include "chrome/common/renderer_configuration.mojom.h" | 113 #include "chrome/common/renderer_configuration.mojom.h" |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 202 #include "third_party/WebKit/public/platform/modules/webshare/webshare.mojom.h" | 203 #include "third_party/WebKit/public/platform/modules/webshare/webshare.mojom.h" |
| 203 #include "ui/base/l10n/l10n_util.h" | 204 #include "ui/base/l10n/l10n_util.h" |
| 204 #include "ui/base/resource/resource_bundle.h" | 205 #include "ui/base/resource/resource_bundle.h" |
| 205 #include "ui/resources/grit/ui_resources.h" | 206 #include "ui/resources/grit/ui_resources.h" |
| 206 #include "url/gurl.h" | 207 #include "url/gurl.h" |
| 207 #include "url/origin.h" | 208 #include "url/origin.h" |
| 208 | 209 |
| 209 #if defined(OS_WIN) | 210 #if defined(OS_WIN) |
| 210 #include "base/strings/string_tokenizer.h" | 211 #include "base/strings/string_tokenizer.h" |
| 211 #include "chrome/browser/chrome_browser_main_win.h" | 212 #include "chrome/browser/chrome_browser_main_win.h" |
| 213 #include "chrome/browser/conflicts/module_database_win.h" | |
| 214 #include "chrome/browser/conflicts/module_event_sink_impl_win.h" | |
| 212 #include "sandbox/win/src/sandbox_policy.h" | 215 #include "sandbox/win/src/sandbox_policy.h" |
| 213 #elif defined(OS_MACOSX) | 216 #elif defined(OS_MACOSX) |
| 214 #include "chrome/browser/chrome_browser_main_mac.h" | 217 #include "chrome/browser/chrome_browser_main_mac.h" |
| 215 #elif defined(OS_CHROMEOS) | 218 #elif defined(OS_CHROMEOS) |
| 216 #include "chrome/browser/chromeos/arc/arc_session_manager.h" | 219 #include "chrome/browser/chromeos/arc/arc_session_manager.h" |
| 217 #include "chrome/browser/chromeos/arc/fileapi/arc_content_file_system_backend_de legate.h" | 220 #include "chrome/browser/chromeos/arc/fileapi/arc_content_file_system_backend_de legate.h" |
| 218 #include "chrome/browser/chromeos/arc/fileapi/arc_documents_provider_backend_del egate.h" | 221 #include "chrome/browser/chromeos/arc/fileapi/arc_documents_provider_backend_del egate.h" |
| 219 #include "chrome/browser/chromeos/arc/intent_helper/arc_navigation_throttle.h" | 222 #include "chrome/browser/chromeos/arc/intent_helper/arc_navigation_throttle.h" |
| 220 #include "chrome/browser/chromeos/attestation/platform_verification_impl.h" | 223 #include "chrome/browser/chromeos/attestation/platform_verification_impl.h" |
| 221 #include "chrome/browser/chromeos/chrome_browser_main_chromeos.h" | 224 #include "chrome/browser/chromeos/chrome_browser_main_chromeos.h" |
| (...skipping 2736 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2958 base::Bind(&BudgetServiceImpl::Create, render_process_host->GetID()), | 2961 base::Bind(&BudgetServiceImpl::Create, render_process_host->GetID()), |
| 2959 ui_task_runner); | 2962 ui_task_runner); |
| 2960 registry->AddInterface( | 2963 registry->AddInterface( |
| 2961 base::Bind(&FieldTrialRecorder::Create), | 2964 base::Bind(&FieldTrialRecorder::Create), |
| 2962 ui_task_runner); | 2965 ui_task_runner); |
| 2963 registry->AddInterface( | 2966 registry->AddInterface( |
| 2964 base::Bind(&rappor::RapporRecorderImpl::Create, | 2967 base::Bind(&rappor::RapporRecorderImpl::Create, |
| 2965 g_browser_process->rappor_service()), | 2968 g_browser_process->rappor_service()), |
| 2966 ui_task_runner); | 2969 ui_task_runner); |
| 2967 | 2970 |
| 2971 #if defined(OS_WIN) | |
| 2972 if (base::FeatureList::IsEnabled(features::kModuleDatabase)) { | |
| 2973 // Add the ModuleDatabase interface. This is the interface used by renderer | |
| 2974 // processes to notify the browser of modules in their address space. It | |
| 2975 // ultimately drives the chrome://conflicts UI. The process handle is not | |
| 2976 // yet available at this point so pass in a callback to allow it to be | |
| 2977 // retrieved at the time the interface is actually created. | |
| 2978 auto get_process = base::Bind(&content::RenderProcessHost::GetHandle, | |
| 2979 base::Unretained(render_process_host)); | |
|
grt (UTC plus 2)
2017/01/11 15:07:54
is it guaranteed that |render_process_host| will s
chrisha
2017/01/11 21:14:11
Yes, it's guaranteed as "GetInstance" is called in
| |
| 2980 registry->AddInterface( | |
| 2981 base::Bind(&ModuleEventSinkImpl::Create, std::move(get_process), | |
| 2982 content::PROCESS_TYPE_RENDERER, | |
| 2983 base::Unretained(ModuleDatabase::GetInstance())), | |
| 2984 ui_task_runner); | |
| 2985 } | |
| 2986 #endif | |
| 2987 | |
| 2968 #if defined(OS_CHROMEOS) | 2988 #if defined(OS_CHROMEOS) |
| 2969 registry->AddInterface<metrics::mojom::LeakDetector>( | 2989 registry->AddInterface<metrics::mojom::LeakDetector>( |
| 2970 base::Bind(&metrics::LeakDetectorRemoteController::Create), | 2990 base::Bind(&metrics::LeakDetectorRemoteController::Create), |
| 2971 ui_task_runner); | 2991 ui_task_runner); |
| 2972 #endif | 2992 #endif |
| 2973 } | 2993 } |
| 2974 | 2994 |
| 2975 void ChromeContentBrowserClient::ExposeInterfacesToMediaService( | 2995 void ChromeContentBrowserClient::ExposeInterfacesToMediaService( |
| 2976 service_manager::InterfaceRegistry* registry, | 2996 service_manager::InterfaceRegistry* registry, |
| 2977 content::RenderFrameHost* render_frame_host) { | 2997 content::RenderFrameHost* render_frame_host) { |
| (...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3374 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { | 3394 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { |
| 3375 return variations::GetVariationParamValue( | 3395 return variations::GetVariationParamValue( |
| 3376 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; | 3396 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; |
| 3377 } | 3397 } |
| 3378 | 3398 |
| 3379 // static | 3399 // static |
| 3380 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( | 3400 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( |
| 3381 const storage::QuotaSettings* settings) { | 3401 const storage::QuotaSettings* settings) { |
| 3382 g_default_quota_settings = settings; | 3402 g_default_quota_settings = settings; |
| 3383 } | 3403 } |
| OLD | NEW |