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 <set> | 7 #include <set> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 1490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1501 void ChromeContentBrowserClient::ClearInspectorSettings(RenderViewHost* rvh) { | 1501 void ChromeContentBrowserClient::ClearInspectorSettings(RenderViewHost* rvh) { |
1502 content::BrowserContext* browser_context = | 1502 content::BrowserContext* browser_context = |
1503 rvh->GetProcess()->GetBrowserContext(); | 1503 rvh->GetProcess()->GetBrowserContext(); |
1504 Profile::FromBrowserContext(browser_context)->GetPrefs()-> | 1504 Profile::FromBrowserContext(browser_context)->GetPrefs()-> |
1505 ClearPref(prefs::kWebKitInspectorSettings); | 1505 ClearPref(prefs::kWebKitInspectorSettings); |
1506 } | 1506 } |
1507 | 1507 |
1508 void ChromeContentBrowserClient::BrowserURLHandlerCreated( | 1508 void ChromeContentBrowserClient::BrowserURLHandlerCreated( |
1509 BrowserURLHandler* handler) { | 1509 BrowserURLHandler* handler) { |
1510 // Add the default URL handlers. | 1510 // Add the default URL handlers. |
1511 #if !defined(OS_ANDROID) | |
digit1
2012/07/10 10:42:59
Might want to put a comment here, and/or a link to
felipeg
2012/07/10 11:14:54
This change shouldn't be here.
I mistakenly reused
| |
1511 handler->AddHandlerPair(&ExtensionWebUI::HandleChromeURLOverride, | 1512 handler->AddHandlerPair(&ExtensionWebUI::HandleChromeURLOverride, |
1512 BrowserURLHandler::null_handler()); | 1513 BrowserURLHandler::null_handler()); |
1513 handler->AddHandlerPair(BrowserURLHandler::null_handler(), | 1514 handler->AddHandlerPair(BrowserURLHandler::null_handler(), |
1514 &ExtensionWebUI::HandleChromeURLOverrideReverse); | 1515 &ExtensionWebUI::HandleChromeURLOverrideReverse); |
1515 | 1516 #endif |
1516 // about: handler. Must come before chrome: handler, since it will | 1517 // about: handler. Must come before chrome: handler, since it will |
1517 // rewrite about: urls to chrome: URLs and then expect chrome: to | 1518 // rewrite about: urls to chrome: URLs and then expect chrome: to |
1518 // actually handle them. | 1519 // actually handle them. |
1519 handler->AddHandlerPair(&WillHandleBrowserAboutURL, | 1520 handler->AddHandlerPair(&WillHandleBrowserAboutURL, |
1520 BrowserURLHandler::null_handler()); | 1521 BrowserURLHandler::null_handler()); |
1521 // chrome: & friends. | 1522 // chrome: & friends. |
1522 handler->AddHandlerPair(&HandleWebUI, | 1523 handler->AddHandlerPair(&HandleWebUI, |
1523 BrowserURLHandler::null_handler()); | 1524 BrowserURLHandler::null_handler()); |
1524 } | 1525 } |
1525 | 1526 |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1647 io_thread_application_locale_ = locale; | 1648 io_thread_application_locale_ = locale; |
1648 } | 1649 } |
1649 | 1650 |
1650 void ChromeContentBrowserClient::SetApplicationLocaleOnIOThread( | 1651 void ChromeContentBrowserClient::SetApplicationLocaleOnIOThread( |
1651 const std::string& locale) { | 1652 const std::string& locale) { |
1652 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 1653 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
1653 io_thread_application_locale_ = locale; | 1654 io_thread_application_locale_ = locale; |
1654 } | 1655 } |
1655 | 1656 |
1656 } // namespace chrome | 1657 } // namespace chrome |
OLD | NEW |