| 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 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 521 } | 521 } |
| 522 | 522 |
| 523 private: | 523 private: |
| 524 void CreateNewWindowImpl(bool is_incognito) { | 524 void CreateNewWindowImpl(bool is_incognito) { |
| 525 Profile* profile = ProfileManager::GetActiveUserProfile(); | 525 Profile* profile = ProfileManager::GetActiveUserProfile(); |
| 526 chrome::NewEmptyWindow(is_incognito ? profile->GetOffTheRecordProfile() | 526 chrome::NewEmptyWindow(is_incognito ? profile->GetOffTheRecordProfile() |
| 527 : profile); | 527 : profile); |
| 528 } | 528 } |
| 529 | 529 |
| 530 // service_manager::Service: | 530 // service_manager::Service: |
| 531 void OnBindInterface(const service_manager::ServiceInfo& remote_info, | 531 void OnBindInterface(const service_manager::BindSourceInfo& remote_info, |
| 532 const std::string& name, | 532 const std::string& name, |
| 533 mojo::ScopedMessagePipeHandle handle) override { | 533 mojo::ScopedMessagePipeHandle handle) override { |
| 534 interfaces_.BindInterface(remote_info.identity, name, std::move(handle)); | 534 interfaces_.BindInterface(remote_info.identity, name, std::move(handle)); |
| 535 } | 535 } |
| 536 | 536 |
| 537 // mash::mojom::Launchable: | 537 // mash::mojom::Launchable: |
| 538 void Launch(uint32_t what, mash::mojom::LaunchMode how) override { | 538 void Launch(uint32_t what, mash::mojom::LaunchMode how) override { |
| 539 if (how != mash::mojom::LaunchMode::MAKE_NEW) { | 539 if (how != mash::mojom::LaunchMode::MAKE_NEW) { |
| 540 LOG(ERROR) << "Unable to handle Launch request with how = " << how; | 540 LOG(ERROR) << "Unable to handle Launch request with how = " << how; |
| 541 return; | 541 return; |
| (...skipping 2695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3237 #endif | 3237 #endif |
| 3238 | 3238 |
| 3239 #if defined(OS_LINUX) || defined(OS_WIN) | 3239 #if defined(OS_LINUX) || defined(OS_WIN) |
| 3240 if (!ChromeOriginTrialPolicy().IsFeatureDisabled("WebShare")) { | 3240 if (!ChromeOriginTrialPolicy().IsFeatureDisabled("WebShare")) { |
| 3241 registry->AddInterface(base::Bind(&ShareServiceImpl::Create)); | 3241 registry->AddInterface(base::Bind(&ShareServiceImpl::Create)); |
| 3242 } | 3242 } |
| 3243 #endif | 3243 #endif |
| 3244 } | 3244 } |
| 3245 | 3245 |
| 3246 void ChromeContentBrowserClient::BindInterfaceRequest( | 3246 void ChromeContentBrowserClient::BindInterfaceRequest( |
| 3247 const service_manager::ServiceInfo& source_info, | 3247 const service_manager::BindSourceInfo& source_info, |
| 3248 const std::string& interface_name, | 3248 const std::string& interface_name, |
| 3249 mojo::ScopedMessagePipeHandle* interface_pipe) { | 3249 mojo::ScopedMessagePipeHandle* interface_pipe) { |
| 3250 if (source_info.identity.name() == content::mojom::kGpuServiceName && | 3250 if (source_info.identity.name() == content::mojom::kGpuServiceName && |
| 3251 gpu_binder_registry_.CanBindInterface(interface_name)) { | 3251 gpu_binder_registry_.CanBindInterface(interface_name)) { |
| 3252 gpu_binder_registry_.BindInterface(source_info.identity, interface_name, | 3252 gpu_binder_registry_.BindInterface(source_info.identity, interface_name, |
| 3253 std::move(*interface_pipe)); | 3253 std::move(*interface_pipe)); |
| 3254 } | 3254 } |
| 3255 } | 3255 } |
| 3256 | 3256 |
| 3257 void ChromeContentBrowserClient::RegisterInProcessServices( | 3257 void ChromeContentBrowserClient::RegisterInProcessServices( |
| (...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3624 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { | 3624 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { |
| 3625 return variations::GetVariationParamValue( | 3625 return variations::GetVariationParamValue( |
| 3626 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; | 3626 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; |
| 3627 } | 3627 } |
| 3628 | 3628 |
| 3629 // static | 3629 // static |
| 3630 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( | 3630 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( |
| 3631 const storage::QuotaSettings* settings) { | 3631 const storage::QuotaSettings* settings) { |
| 3632 g_default_quota_settings = settings; | 3632 g_default_quota_settings = settings; |
| 3633 } | 3633 } |
| OLD | NEW |