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 1734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1745 FilePath ChromeContentBrowserClient::GetDefaultDownloadDirectory() { | 1745 FilePath ChromeContentBrowserClient::GetDefaultDownloadDirectory() { |
1746 return download_util::GetDefaultDownloadDirectory(); | 1746 return download_util::GetDefaultDownloadDirectory(); |
1747 } | 1747 } |
1748 | 1748 |
1749 std::string ChromeContentBrowserClient::GetDefaultDownloadName() { | 1749 std::string ChromeContentBrowserClient::GetDefaultDownloadName() { |
1750 return l10n_util::GetStringUTF8(IDS_DEFAULT_DOWNLOAD_FILENAME); | 1750 return l10n_util::GetStringUTF8(IDS_DEFAULT_DOWNLOAD_FILENAME); |
1751 } | 1751 } |
1752 | 1752 |
1753 void ChromeContentBrowserClient::DidCreatePpapiPlugin( | 1753 void ChromeContentBrowserClient::DidCreatePpapiPlugin( |
1754 content::BrowserPpapiHost* browser_host) { | 1754 content::BrowserPpapiHost* browser_host) { |
| 1755 #if defined(ENABLE_PPAPI) |
1755 browser_host->GetPpapiHost()->AddHostFactoryFilter( | 1756 browser_host->GetPpapiHost()->AddHostFactoryFilter( |
1756 scoped_ptr<ppapi::host::HostFactory>( | 1757 scoped_ptr<ppapi::host::HostFactory>( |
1757 new ChromeBrowserPepperHostFactory(browser_host))); | 1758 new ChromeBrowserPepperHostFactory(browser_host))); |
| 1759 #endif |
1758 } | 1760 } |
1759 | 1761 |
1760 content::BrowserPpapiHost* | 1762 content::BrowserPpapiHost* |
1761 ChromeContentBrowserClient::GetExternalBrowserPpapiHost( | 1763 ChromeContentBrowserClient::GetExternalBrowserPpapiHost( |
1762 int plugin_process_id) { | 1764 int plugin_process_id) { |
1763 BrowserChildProcessHostIterator iter(content::PROCESS_TYPE_NACL_LOADER); | 1765 BrowserChildProcessHostIterator iter(content::PROCESS_TYPE_NACL_LOADER); |
1764 while (!iter.Done()) { | 1766 while (!iter.Done()) { |
1765 NaClProcessHost* host = static_cast<NaClProcessHost*>(iter.GetDelegate()); | 1767 NaClProcessHost* host = static_cast<NaClProcessHost*>(iter.GetDelegate()); |
1766 if (host->process() && | 1768 if (host->process() && |
1767 host->process()->GetData().id == plugin_process_id) { | 1769 host->process()->GetData().id == plugin_process_id) { |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1930 io_thread_application_locale_ = locale; | 1932 io_thread_application_locale_ = locale; |
1931 } | 1933 } |
1932 | 1934 |
1933 void ChromeContentBrowserClient::SetApplicationLocaleOnIOThread( | 1935 void ChromeContentBrowserClient::SetApplicationLocaleOnIOThread( |
1934 const std::string& locale) { | 1936 const std::string& locale) { |
1935 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 1937 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
1936 io_thread_application_locale_ = locale; | 1938 io_thread_application_locale_ = locale; |
1937 } | 1939 } |
1938 | 1940 |
1939 } // namespace chrome | 1941 } // namespace chrome |
OLD | NEW |