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 17 matching lines...) Expand all Loading... |
28 #include "chrome/browser/browser_process.h" | 28 #include "chrome/browser/browser_process.h" |
29 #include "chrome/browser/browser_shutdown.h" | 29 #include "chrome/browser/browser_shutdown.h" |
30 #include "chrome/browser/browsing_data/browsing_data_helper.h" | 30 #include "chrome/browser/browsing_data/browsing_data_helper.h" |
31 #include "chrome/browser/browsing_data/browsing_data_remover.h" | 31 #include "chrome/browser/browsing_data/browsing_data_remover.h" |
32 #include "chrome/browser/character_encoding.h" | 32 #include "chrome/browser/character_encoding.h" |
33 #include "chrome/browser/chrome_content_browser_client_parts.h" | 33 #include "chrome/browser/chrome_content_browser_client_parts.h" |
34 #include "chrome/browser/chrome_net_benchmarking_message_filter.h" | 34 #include "chrome/browser/chrome_net_benchmarking_message_filter.h" |
35 #include "chrome/browser/chrome_quota_permission_context.h" | 35 #include "chrome/browser/chrome_quota_permission_context.h" |
36 #include "chrome/browser/content_settings/cookie_settings_factory.h" | 36 #include "chrome/browser/content_settings/cookie_settings_factory.h" |
37 #include "chrome/browser/content_settings/tab_specific_content_settings.h" | 37 #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
| 38 #include "chrome/browser/custom_handlers/protocol_handler_registry_factory.h" |
38 #include "chrome/browser/defaults.h" | 39 #include "chrome/browser/defaults.h" |
39 #include "chrome/browser/devtools/chrome_devtools_manager_delegate.h" | 40 #include "chrome/browser/devtools/chrome_devtools_manager_delegate.h" |
40 #include "chrome/browser/download/download_prefs.h" | 41 #include "chrome/browser/download/download_prefs.h" |
41 #include "chrome/browser/font_family_cache.h" | 42 #include "chrome/browser/font_family_cache.h" |
42 #include "chrome/browser/geolocation/chrome_access_token_store.h" | 43 #include "chrome/browser/geolocation/chrome_access_token_store.h" |
43 #include "chrome/browser/media/media_capture_devices_dispatcher.h" | 44 #include "chrome/browser/media/media_capture_devices_dispatcher.h" |
44 #include "chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h" | 45 #include "chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h" |
45 #include "chrome/browser/nacl_host/nacl_browser_delegate_impl.h" | 46 #include "chrome/browser/nacl_host/nacl_browser_delegate_impl.h" |
46 #include "chrome/browser/net/chrome_net_log.h" | 47 #include "chrome/browser/net/chrome_net_log.h" |
47 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" | 48 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" |
(...skipping 951 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
999 partition_path, | 1000 partition_path, |
1000 in_memory, | 1001 in_memory, |
1001 protocol_handlers, | 1002 protocol_handlers, |
1002 request_interceptors.Pass()); | 1003 request_interceptors.Pass()); |
1003 } | 1004 } |
1004 | 1005 |
1005 bool ChromeContentBrowserClient::IsHandledURL(const GURL& url) { | 1006 bool ChromeContentBrowserClient::IsHandledURL(const GURL& url) { |
1006 return ProfileIOData::IsHandledURL(url); | 1007 return ProfileIOData::IsHandledURL(url); |
1007 } | 1008 } |
1008 | 1009 |
| 1010 GURL ChromeContentBrowserClient::GetHandlerFor( |
| 1011 content::BrowserContext* browser_context, const GURL& url) { |
| 1012 ProtocolHandlerRegistry* registry = |
| 1013 ProtocolHandlerRegistryFactory::GetForBrowserContext(browser_context); |
| 1014 return registry->GetHandlerFor(url.scheme()).TranslateUrl(url); |
| 1015 } |
| 1016 |
1009 bool ChromeContentBrowserClient::CanCommitURL( | 1017 bool ChromeContentBrowserClient::CanCommitURL( |
1010 content::RenderProcessHost* process_host, | 1018 content::RenderProcessHost* process_host, |
1011 const GURL& url) { | 1019 const GURL& url) { |
1012 #if defined(ENABLE_EXTENSIONS) | 1020 #if defined(ENABLE_EXTENSIONS) |
1013 return ChromeContentBrowserClientExtensionsPart::CanCommitURL( | 1021 return ChromeContentBrowserClientExtensionsPart::CanCommitURL( |
1014 process_host, url); | 1022 process_host, url); |
1015 #else | 1023 #else |
1016 return true; | 1024 return true; |
1017 #endif | 1025 #endif |
1018 } | 1026 } |
(...skipping 1625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2644 switches::kDisableWebRtcEncryption, | 2652 switches::kDisableWebRtcEncryption, |
2645 }; | 2653 }; |
2646 to_command_line->CopySwitchesFrom(from_command_line, | 2654 to_command_line->CopySwitchesFrom(from_command_line, |
2647 kWebRtcDevSwitchNames, | 2655 kWebRtcDevSwitchNames, |
2648 arraysize(kWebRtcDevSwitchNames)); | 2656 arraysize(kWebRtcDevSwitchNames)); |
2649 } | 2657 } |
2650 } | 2658 } |
2651 #endif // defined(ENABLE_WEBRTC) | 2659 #endif // defined(ENABLE_WEBRTC) |
2652 | 2660 |
2653 } // namespace chrome | 2661 } // namespace chrome |
OLD | NEW |