| 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 #include "chrome/browser/ui/chrome_select_file_policy.h" | 76 #include "chrome/browser/ui/chrome_select_file_policy.h" |
| 77 #include "chrome/browser/ui/tab_contents/chrome_web_contents_view_delegate.h" | 77 #include "chrome/browser/ui/tab_contents/chrome_web_contents_view_delegate.h" |
| 78 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h" | 78 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h" |
| 79 #include "chrome/browser/ui/webui/sync_promo/sync_promo_ui.h" | 79 #include "chrome/browser/ui/webui/sync_promo/sync_promo_ui.h" |
| 80 #include "chrome/browser/user_style_sheet_watcher.h" | 80 #include "chrome/browser/user_style_sheet_watcher.h" |
| 81 #include "chrome/browser/user_style_sheet_watcher_factory.h" | 81 #include "chrome/browser/user_style_sheet_watcher_factory.h" |
| 82 #include "chrome/browser/view_type_utils.h" | 82 #include "chrome/browser/view_type_utils.h" |
| 83 #include "chrome/common/child_process_logging.h" | 83 #include "chrome/common/child_process_logging.h" |
| 84 #include "chrome/common/chrome_constants.h" | 84 #include "chrome/common/chrome_constants.h" |
| 85 #include "chrome/common/chrome_paths.h" | 85 #include "chrome/common/chrome_paths.h" |
| 86 #include "chrome/common/chrome_process_type.h" |
| 86 #include "chrome/common/chrome_switches.h" | 87 #include "chrome/common/chrome_switches.h" |
| 87 #include "chrome/common/extensions/background_info.h" | 88 #include "chrome/common/extensions/background_info.h" |
| 88 #include "chrome/common/extensions/extension.h" | 89 #include "chrome/common/extensions/extension.h" |
| 89 #include "chrome/common/extensions/extension_process_policy.h" | 90 #include "chrome/common/extensions/extension_process_policy.h" |
| 90 #include "chrome/common/extensions/extension_set.h" | 91 #include "chrome/common/extensions/extension_set.h" |
| 91 #include "chrome/common/extensions/permissions/socket_permission.h" | 92 #include "chrome/common/extensions/permissions/socket_permission.h" |
| 92 #include "chrome/common/logging_chrome.h" | 93 #include "chrome/common/logging_chrome.h" |
| 93 #include "chrome/common/pref_names.h" | 94 #include "chrome/common/pref_names.h" |
| 94 #include "chrome/common/render_messages.h" | 95 #include "chrome/common/render_messages.h" |
| 95 #include "chrome/common/url_constants.h" | 96 #include "chrome/common/url_constants.h" |
| (...skipping 1852 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1948 #if defined(ENABLE_PLUGINS) | 1949 #if defined(ENABLE_PLUGINS) |
| 1949 browser_host->GetPpapiHost()->AddHostFactoryFilter( | 1950 browser_host->GetPpapiHost()->AddHostFactoryFilter( |
| 1950 scoped_ptr<ppapi::host::HostFactory>( | 1951 scoped_ptr<ppapi::host::HostFactory>( |
| 1951 new ChromeBrowserPepperHostFactory(browser_host))); | 1952 new ChromeBrowserPepperHostFactory(browser_host))); |
| 1952 #endif | 1953 #endif |
| 1953 } | 1954 } |
| 1954 | 1955 |
| 1955 content::BrowserPpapiHost* | 1956 content::BrowserPpapiHost* |
| 1956 ChromeContentBrowserClient::GetExternalBrowserPpapiHost( | 1957 ChromeContentBrowserClient::GetExternalBrowserPpapiHost( |
| 1957 int plugin_process_id) { | 1958 int plugin_process_id) { |
| 1958 BrowserChildProcessHostIterator iter(content::PROCESS_TYPE_NACL_LOADER); | 1959 BrowserChildProcessHostIterator iter(PROCESS_TYPE_NACL_LOADER); |
| 1959 while (!iter.Done()) { | 1960 while (!iter.Done()) { |
| 1960 NaClProcessHost* host = static_cast<NaClProcessHost*>(iter.GetDelegate()); | 1961 NaClProcessHost* host = static_cast<NaClProcessHost*>(iter.GetDelegate()); |
| 1961 if (host->process() && | 1962 if (host->process() && |
| 1962 host->process()->GetData().id == plugin_process_id) { | 1963 host->process()->GetData().id == plugin_process_id) { |
| 1963 // Found the plugin. | 1964 // Found the plugin. |
| 1964 return host->browser_ppapi_host(); | 1965 return host->browser_ppapi_host(); |
| 1965 } | 1966 } |
| 1966 ++iter; | 1967 ++iter; |
| 1967 } | 1968 } |
| 1968 return NULL; | 1969 return NULL; |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2156 io_thread_application_locale_ = locale; | 2157 io_thread_application_locale_ = locale; |
| 2157 } | 2158 } |
| 2158 | 2159 |
| 2159 void ChromeContentBrowserClient::SetApplicationLocaleOnIOThread( | 2160 void ChromeContentBrowserClient::SetApplicationLocaleOnIOThread( |
| 2160 const std::string& locale) { | 2161 const std::string& locale) { |
| 2161 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 2162 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 2162 io_thread_application_locale_ = locale; | 2163 io_thread_application_locale_ = locale; |
| 2163 } | 2164 } |
| 2164 | 2165 |
| 2165 } // namespace chrome | 2166 } // namespace chrome |
| OLD | NEW |