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 1745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1756 FilePath ChromeContentBrowserClient::GetDefaultDownloadDirectory() { | 1756 FilePath ChromeContentBrowserClient::GetDefaultDownloadDirectory() { |
1757 return download_util::GetDefaultDownloadDirectory(); | 1757 return download_util::GetDefaultDownloadDirectory(); |
1758 } | 1758 } |
1759 | 1759 |
1760 std::string ChromeContentBrowserClient::GetDefaultDownloadName() { | 1760 std::string ChromeContentBrowserClient::GetDefaultDownloadName() { |
1761 return l10n_util::GetStringUTF8(IDS_DEFAULT_DOWNLOAD_FILENAME); | 1761 return l10n_util::GetStringUTF8(IDS_DEFAULT_DOWNLOAD_FILENAME); |
1762 } | 1762 } |
1763 | 1763 |
1764 void ChromeContentBrowserClient::DidCreatePpapiPlugin( | 1764 void ChromeContentBrowserClient::DidCreatePpapiPlugin( |
1765 content::BrowserPpapiHost* browser_host) { | 1765 content::BrowserPpapiHost* browser_host) { |
| 1766 #if defined(ENABLE_PLUGINS) |
1766 browser_host->GetPpapiHost()->AddHostFactoryFilter( | 1767 browser_host->GetPpapiHost()->AddHostFactoryFilter( |
1767 scoped_ptr<ppapi::host::HostFactory>( | 1768 scoped_ptr<ppapi::host::HostFactory>( |
1768 new ChromeBrowserPepperHostFactory(browser_host))); | 1769 new ChromeBrowserPepperHostFactory(browser_host))); |
| 1770 #endif |
1769 } | 1771 } |
1770 | 1772 |
1771 content::BrowserPpapiHost* | 1773 content::BrowserPpapiHost* |
1772 ChromeContentBrowserClient::GetExternalBrowserPpapiHost( | 1774 ChromeContentBrowserClient::GetExternalBrowserPpapiHost( |
1773 int plugin_process_id) { | 1775 int plugin_process_id) { |
1774 BrowserChildProcessHostIterator iter(content::PROCESS_TYPE_NACL_LOADER); | 1776 BrowserChildProcessHostIterator iter(content::PROCESS_TYPE_NACL_LOADER); |
1775 while (!iter.Done()) { | 1777 while (!iter.Done()) { |
1776 NaClProcessHost* host = static_cast<NaClProcessHost*>(iter.GetDelegate()); | 1778 NaClProcessHost* host = static_cast<NaClProcessHost*>(iter.GetDelegate()); |
1777 if (host->process() && | 1779 if (host->process() && |
1778 host->process()->GetData().id == plugin_process_id) { | 1780 host->process()->GetData().id == plugin_process_id) { |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1943 io_thread_application_locale_ = locale; | 1945 io_thread_application_locale_ = locale; |
1944 } | 1946 } |
1945 | 1947 |
1946 void ChromeContentBrowserClient::SetApplicationLocaleOnIOThread( | 1948 void ChromeContentBrowserClient::SetApplicationLocaleOnIOThread( |
1947 const std::string& locale) { | 1949 const std::string& locale) { |
1948 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 1950 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
1949 io_thread_application_locale_ = locale; | 1951 io_thread_application_locale_ = locale; |
1950 } | 1952 } |
1951 | 1953 |
1952 } // namespace chrome | 1954 } // namespace chrome |
OLD | NEW |