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 607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
618 GetRendererContentSettingRules(profile->GetHostContentSettingsMap(), &rules); | 618 GetRendererContentSettingRules(profile->GetHostContentSettingsMap(), &rules); |
619 host->Send(new ChromeViewMsg_SetContentSettingRules(rules)); | 619 host->Send(new ChromeViewMsg_SetContentSettingRules(rules)); |
620 | 620 |
621 #if defined(OS_ANDROID) && defined(USE_LINUX_BREAKPAD) | 621 #if defined(OS_ANDROID) && defined(USE_LINUX_BREAKPAD) |
622 InitCrashDumpManager(); | 622 InitCrashDumpManager(); |
623 #endif | 623 #endif |
624 } | 624 } |
625 | 625 |
626 void ChromeContentBrowserClient::BrowserChildProcessHostCreated( | 626 void ChromeContentBrowserClient::BrowserChildProcessHostCreated( |
627 content::BrowserChildProcessHost* host) { | 627 content::BrowserChildProcessHost* host) { |
| 628 #if defined(ENABLE_PPAPI) |
628 host->GetHost()->AddFilter(new PepperGtalkMessageFilter()); | 629 host->GetHost()->AddFilter(new PepperGtalkMessageFilter()); |
| 630 #endif |
629 } | 631 } |
630 | 632 |
631 content::WebUIControllerFactory* | 633 content::WebUIControllerFactory* |
632 ChromeContentBrowserClient::GetWebUIControllerFactory() { | 634 ChromeContentBrowserClient::GetWebUIControllerFactory() { |
633 return ChromeWebUIControllerFactory::GetInstance(); | 635 return ChromeWebUIControllerFactory::GetInstance(); |
634 } | 636 } |
635 | 637 |
636 GURL ChromeContentBrowserClient::GetEffectiveURL( | 638 GURL ChromeContentBrowserClient::GetEffectiveURL( |
637 content::BrowserContext* browser_context, const GURL& url) { | 639 content::BrowserContext* browser_context, const GURL& url) { |
638 Profile* profile = Profile::FromBrowserContext(browser_context); | 640 Profile* profile = Profile::FromBrowserContext(browser_context); |
(...skipping 1110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1749 FilePath ChromeContentBrowserClient::GetDefaultDownloadDirectory() { | 1751 FilePath ChromeContentBrowserClient::GetDefaultDownloadDirectory() { |
1750 return download_util::GetDefaultDownloadDirectory(); | 1752 return download_util::GetDefaultDownloadDirectory(); |
1751 } | 1753 } |
1752 | 1754 |
1753 std::string ChromeContentBrowserClient::GetDefaultDownloadName() { | 1755 std::string ChromeContentBrowserClient::GetDefaultDownloadName() { |
1754 return l10n_util::GetStringUTF8(IDS_DEFAULT_DOWNLOAD_FILENAME); | 1756 return l10n_util::GetStringUTF8(IDS_DEFAULT_DOWNLOAD_FILENAME); |
1755 } | 1757 } |
1756 | 1758 |
1757 void ChromeContentBrowserClient::DidCreatePpapiPlugin( | 1759 void ChromeContentBrowserClient::DidCreatePpapiPlugin( |
1758 content::BrowserPpapiHost* browser_host) { | 1760 content::BrowserPpapiHost* browser_host) { |
| 1761 #if defined(ENABLE_PPAPI) |
1759 browser_host->GetPpapiHost()->AddHostFactoryFilter( | 1762 browser_host->GetPpapiHost()->AddHostFactoryFilter( |
1760 scoped_ptr<ppapi::host::HostFactory>( | 1763 scoped_ptr<ppapi::host::HostFactory>( |
1761 new ChromeBrowserPepperHostFactory(browser_host))); | 1764 new ChromeBrowserPepperHostFactory(browser_host))); |
| 1765 #endif |
1762 } | 1766 } |
1763 | 1767 |
1764 content::BrowserPpapiHost* | 1768 content::BrowserPpapiHost* |
1765 ChromeContentBrowserClient::GetExternalBrowserPpapiHost( | 1769 ChromeContentBrowserClient::GetExternalBrowserPpapiHost( |
1766 int plugin_process_id) { | 1770 int plugin_process_id) { |
1767 BrowserChildProcessHostIterator iter(content::PROCESS_TYPE_NACL_LOADER); | 1771 BrowserChildProcessHostIterator iter(content::PROCESS_TYPE_NACL_LOADER); |
1768 while (!iter.Done()) { | 1772 while (!iter.Done()) { |
1769 NaClProcessHost* host = static_cast<NaClProcessHost*>(iter.GetDelegate()); | 1773 NaClProcessHost* host = static_cast<NaClProcessHost*>(iter.GetDelegate()); |
1770 if (host->process() && | 1774 if (host->process() && |
1771 host->process()->GetData().id == plugin_process_id) { | 1775 host->process()->GetData().id == plugin_process_id) { |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1934 io_thread_application_locale_ = locale; | 1938 io_thread_application_locale_ = locale; |
1935 } | 1939 } |
1936 | 1940 |
1937 void ChromeContentBrowserClient::SetApplicationLocaleOnIOThread( | 1941 void ChromeContentBrowserClient::SetApplicationLocaleOnIOThread( |
1938 const std::string& locale) { | 1942 const std::string& locale) { |
1939 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 1943 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
1940 io_thread_application_locale_ = locale; | 1944 io_thread_application_locale_ = locale; |
1941 } | 1945 } |
1942 | 1946 |
1943 } // namespace chrome | 1947 } // namespace chrome |
OLD | NEW |