OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <set> | 7 #include <set> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 1017 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1028 } | 1028 } |
1029 | 1029 |
1030 void ChromeContentBrowserClient::BrowserURLHandlerCreated( | 1030 void ChromeContentBrowserClient::BrowserURLHandlerCreated( |
1031 BrowserURLHandler* handler) { | 1031 BrowserURLHandler* handler) { |
1032 // Add the default URL handlers. | 1032 // Add the default URL handlers. |
1033 handler->AddHandlerPair(&ExtensionWebUI::HandleChromeURLOverride, | 1033 handler->AddHandlerPair(&ExtensionWebUI::HandleChromeURLOverride, |
1034 BrowserURLHandler::null_handler()); | 1034 BrowserURLHandler::null_handler()); |
1035 handler->AddHandlerPair(BrowserURLHandler::null_handler(), | 1035 handler->AddHandlerPair(BrowserURLHandler::null_handler(), |
1036 &ExtensionWebUI::HandleChromeURLOverrideReverse); | 1036 &ExtensionWebUI::HandleChromeURLOverrideReverse); |
1037 | 1037 |
1038 // about: | 1038 // about: handler. Must come before chrome: handler, since it will |
| 1039 // rewrite about: urls to chrome: URLs and then expect chrome: to |
| 1040 // actually handle them. |
1039 handler->AddHandlerPair(&WillHandleBrowserAboutURL, | 1041 handler->AddHandlerPair(&WillHandleBrowserAboutURL, |
1040 BrowserURLHandler::null_handler()); | 1042 BrowserURLHandler::null_handler()); |
1041 // chrome: & friends. | 1043 // chrome: & friends. |
1042 handler->AddHandlerPair(&HandleWebUI, | 1044 handler->AddHandlerPair(&HandleWebUI, |
1043 BrowserURLHandler::null_handler()); | 1045 BrowserURLHandler::null_handler()); |
1044 } | 1046 } |
1045 | 1047 |
1046 void ChromeContentBrowserClient::ClearCache(RenderViewHost* rvh) { | 1048 void ChromeContentBrowserClient::ClearCache(RenderViewHost* rvh) { |
1047 Profile* profile = Profile::FromBrowserContext( | 1049 Profile* profile = Profile::FromBrowserContext( |
1048 rvh->site_instance()->GetProcess()->GetBrowserContext()); | 1050 rvh->site_instance()->GetProcess()->GetBrowserContext()); |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1109 #if defined(USE_NSS) | 1111 #if defined(USE_NSS) |
1110 crypto::CryptoModuleBlockingPasswordDelegate* | 1112 crypto::CryptoModuleBlockingPasswordDelegate* |
1111 ChromeContentBrowserClient::GetCryptoPasswordDelegate( | 1113 ChromeContentBrowserClient::GetCryptoPasswordDelegate( |
1112 const GURL& url) { | 1114 const GURL& url) { |
1113 return browser::NewCryptoModuleBlockingDialogDelegate( | 1115 return browser::NewCryptoModuleBlockingDialogDelegate( |
1114 browser::kCryptoModulePasswordKeygen, url.host()); | 1116 browser::kCryptoModulePasswordKeygen, url.host()); |
1115 } | 1117 } |
1116 #endif | 1118 #endif |
1117 | 1119 |
1118 } // namespace chrome | 1120 } // namespace chrome |
OLD | NEW |