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 1725 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1736 return g_io_thread_application_locale.Get(); | 1736 return g_io_thread_application_locale.Get(); |
1737 return g_browser_process->GetApplicationLocale(); | 1737 return g_browser_process->GetApplicationLocale(); |
1738 } | 1738 } |
1739 | 1739 |
1740 std::string ChromeContentBrowserClient::GetAcceptLangs( | 1740 std::string ChromeContentBrowserClient::GetAcceptLangs( |
1741 content::BrowserContext* context) { | 1741 content::BrowserContext* context) { |
1742 Profile* profile = Profile::FromBrowserContext(context); | 1742 Profile* profile = Profile::FromBrowserContext(context); |
1743 return profile->GetPrefs()->GetString(prefs::kAcceptLanguages); | 1743 return profile->GetPrefs()->GetString(prefs::kAcceptLanguages); |
1744 } | 1744 } |
1745 | 1745 |
1746 gfx::ImageSkia* ChromeContentBrowserClient::GetDefaultFavicon() { | 1746 const gfx::ImageSkia* ChromeContentBrowserClient::GetDefaultFavicon() { |
1747 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); | 1747 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
1748 return rb.GetImageSkiaNamed(IDR_DEFAULT_FAVICON); | 1748 return rb.GetNativeImageNamed(IDR_DEFAULT_FAVICON).ToImageSkia(); |
1749 } | 1749 } |
1750 | 1750 |
1751 bool ChromeContentBrowserClient::AllowAppCache( | 1751 bool ChromeContentBrowserClient::AllowAppCache( |
1752 const GURL& manifest_url, | 1752 const GURL& manifest_url, |
1753 const GURL& first_party, | 1753 const GURL& first_party, |
1754 content::ResourceContext* context) { | 1754 content::ResourceContext* context) { |
1755 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 1755 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
1756 ProfileIOData* io_data = ProfileIOData::FromResourceContext(context); | 1756 ProfileIOData* io_data = ProfileIOData::FromResourceContext(context); |
1757 return io_data->GetCookieSettings()-> | 1757 return io_data->GetCookieSettings()-> |
1758 IsSettingCookieAllowed(manifest_url, first_party); | 1758 IsSettingCookieAllowed(manifest_url, first_party); |
(...skipping 1006 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2765 switches::kDisableWebRtcEncryption, | 2765 switches::kDisableWebRtcEncryption, |
2766 }; | 2766 }; |
2767 to_command_line->CopySwitchesFrom(from_command_line, | 2767 to_command_line->CopySwitchesFrom(from_command_line, |
2768 kWebRtcDevSwitchNames, | 2768 kWebRtcDevSwitchNames, |
2769 arraysize(kWebRtcDevSwitchNames)); | 2769 arraysize(kWebRtcDevSwitchNames)); |
2770 } | 2770 } |
2771 } | 2771 } |
2772 #endif // defined(ENABLE_WEBRTC) | 2772 #endif // defined(ENABLE_WEBRTC) |
2773 | 2773 |
2774 } // namespace chrome | 2774 } // namespace chrome |
OLD | NEW |