| 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 635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 646 } | 646 } |
| 647 | 647 |
| 648 std::string ChromeContentBrowserClient::GetAcceptLangs( | 648 std::string ChromeContentBrowserClient::GetAcceptLangs( |
| 649 content::BrowserContext* context) { | 649 content::BrowserContext* context) { |
| 650 Profile* profile = Profile::FromBrowserContext(context); | 650 Profile* profile = Profile::FromBrowserContext(context); |
| 651 return profile->GetPrefs()->GetString(prefs::kAcceptLanguages); | 651 return profile->GetPrefs()->GetString(prefs::kAcceptLanguages); |
| 652 } | 652 } |
| 653 | 653 |
| 654 SkBitmap* ChromeContentBrowserClient::GetDefaultFavicon() { | 654 SkBitmap* ChromeContentBrowserClient::GetDefaultFavicon() { |
| 655 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); | 655 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
| 656 #if defined(TOUCH_UI) | |
| 657 // In touch builds, we want large default favicons for the tabstrip, but in | |
| 658 // other places (such as bookmark, manage search engines, homepage) we assume | |
| 659 // default favicons are 16x16. | |
| 660 return rb.GetBitmapNamed(IDR_DEFAULT_LARGE_FAVICON); | |
| 661 #else | |
| 662 return rb.GetBitmapNamed(IDR_DEFAULT_FAVICON); | 656 return rb.GetBitmapNamed(IDR_DEFAULT_FAVICON); |
| 663 #endif | |
| 664 } | 657 } |
| 665 | 658 |
| 666 bool ChromeContentBrowserClient::AllowAppCache( | 659 bool ChromeContentBrowserClient::AllowAppCache( |
| 667 const GURL& manifest_url, | 660 const GURL& manifest_url, |
| 668 const GURL& first_party, | 661 const GURL& first_party, |
| 669 const content::ResourceContext& context) { | 662 const content::ResourceContext& context) { |
| 670 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 663 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 671 ProfileIOData* io_data = | 664 ProfileIOData* io_data = |
| 672 reinterpret_cast<ProfileIOData*>(context.GetUserData(NULL)); | 665 reinterpret_cast<ProfileIOData*>(context.GetUserData(NULL)); |
| 673 return io_data->GetCookieSettings()-> | 666 return io_data->GetCookieSettings()-> |
| (...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1120 #if defined(USE_NSS) | 1113 #if defined(USE_NSS) |
| 1121 crypto::CryptoModuleBlockingPasswordDelegate* | 1114 crypto::CryptoModuleBlockingPasswordDelegate* |
| 1122 ChromeContentBrowserClient::GetCryptoPasswordDelegate( | 1115 ChromeContentBrowserClient::GetCryptoPasswordDelegate( |
| 1123 const GURL& url) { | 1116 const GURL& url) { |
| 1124 return browser::NewCryptoModuleBlockingDialogDelegate( | 1117 return browser::NewCryptoModuleBlockingDialogDelegate( |
| 1125 browser::kCryptoModulePasswordKeygen, url.host()); | 1118 browser::kCryptoModulePasswordKeygen, url.host()); |
| 1126 } | 1119 } |
| 1127 #endif | 1120 #endif |
| 1128 | 1121 |
| 1129 } // namespace chrome | 1122 } // namespace chrome |
| OLD | NEW |