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 1296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1307 } | 1307 } |
1308 | 1308 |
1309 // These are treated as WebUI schemes but do not get WebUI bindings. Also, | 1309 // These are treated as WebUI schemes but do not get WebUI bindings. Also, |
1310 // view-source is allowed for these schemes. | 1310 // view-source is allowed for these schemes. |
1311 void ChromeContentBrowserClient::GetAdditionalWebUISchemes( | 1311 void ChromeContentBrowserClient::GetAdditionalWebUISchemes( |
1312 std::vector<std::string>* additional_schemes) { | 1312 std::vector<std::string>* additional_schemes) { |
1313 additional_schemes->push_back(chrome::kChromeSearchScheme); | 1313 additional_schemes->push_back(chrome::kChromeSearchScheme); |
1314 additional_schemes->push_back(dom_distiller::kDomDistillerScheme); | 1314 additional_schemes->push_back(dom_distiller::kDomDistillerScheme); |
1315 } | 1315 } |
1316 | 1316 |
| 1317 void ChromeContentBrowserClient::GetAdditionalViewSourceSchemes( |
| 1318 std::vector<std::string>* additional_schemes) { |
| 1319 GetAdditionalWebUISchemes(additional_schemes); |
| 1320 |
| 1321 #if BUILDFLAG(ENABLE_EXTENSIONS) |
| 1322 additional_schemes->push_back(extensions::kExtensionScheme); |
| 1323 #endif |
| 1324 } |
| 1325 |
1317 bool ChromeContentBrowserClient::LogWebUIUrl(const GURL& web_ui_url) const { | 1326 bool ChromeContentBrowserClient::LogWebUIUrl(const GURL& web_ui_url) const { |
1318 return webui::LogWebUIUrl(web_ui_url); | 1327 return webui::LogWebUIUrl(web_ui_url); |
1319 } | 1328 } |
1320 | 1329 |
1321 bool ChromeContentBrowserClient::IsHandledURL(const GURL& url) { | 1330 bool ChromeContentBrowserClient::IsHandledURL(const GURL& url) { |
1322 return ProfileIOData::IsHandledURL(url); | 1331 return ProfileIOData::IsHandledURL(url); |
1323 } | 1332 } |
1324 | 1333 |
1325 bool ChromeContentBrowserClient::CanCommitURL( | 1334 bool ChromeContentBrowserClient::CanCommitURL( |
1326 content::RenderProcessHost* process_host, | 1335 content::RenderProcessHost* process_host, |
(...skipping 2224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3551 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { | 3560 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { |
3552 return variations::GetVariationParamValue( | 3561 return variations::GetVariationParamValue( |
3553 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; | 3562 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; |
3554 } | 3563 } |
3555 | 3564 |
3556 // static | 3565 // static |
3557 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( | 3566 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( |
3558 const storage::QuotaSettings* settings) { | 3567 const storage::QuotaSettings* settings) { |
3559 g_default_quota_settings = settings; | 3568 g_default_quota_settings = settings; |
3560 } | 3569 } |
OLD | NEW |