Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/browser_process_impl.h" | 5 #include "chrome/browser/browser_process_impl.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 82 #include "content/browser/renderer_host/render_process_host.h" | 82 #include "content/browser/renderer_host/render_process_host.h" |
| 83 #include "content/browser/renderer_host/resource_dispatcher_host.h" | 83 #include "content/browser/renderer_host/resource_dispatcher_host.h" |
| 84 #include "content/public/browser/browser_thread.h" | 84 #include "content/public/browser/browser_thread.h" |
| 85 #include "content/public/browser/notification_details.h" | 85 #include "content/public/browser/notification_details.h" |
| 86 #include "content/public/common/url_fetcher.h" | 86 #include "content/public/common/url_fetcher.h" |
| 87 #include "ipc/ipc_logging.h" | 87 #include "ipc/ipc_logging.h" |
| 88 #include "net/socket/client_socket_pool_manager.h" | 88 #include "net/socket/client_socket_pool_manager.h" |
| 89 #include "net/url_request/url_request_context_getter.h" | 89 #include "net/url_request/url_request_context_getter.h" |
| 90 #include "ui/base/clipboard/clipboard.h" | 90 #include "ui/base/clipboard/clipboard.h" |
| 91 #include "ui/base/l10n/l10n_util.h" | 91 #include "ui/base/l10n/l10n_util.h" |
| 92 #include "webkit/plugins/npapi/plugin_list.h" | |
| 92 | 93 |
| 93 #if defined(OS_WIN) | 94 #if defined(OS_WIN) |
| 94 #include "views/focus/view_storage.h" | 95 #include "views/focus/view_storage.h" |
| 95 #elif defined(OS_MACOSX) | 96 #elif defined(OS_MACOSX) |
| 96 #include "chrome/browser/chrome_browser_main_mac.h" | 97 #include "chrome/browser/chrome_browser_main_mac.h" |
| 97 #endif | 98 #endif |
| 98 | 99 |
| 99 #if defined(IPC_MESSAGE_LOG_ENABLED) | 100 #if defined(IPC_MESSAGE_LOG_ENABLED) |
| 100 #include "content/common/child_process_messages.h" | 101 #include "content/common/child_process_messages.h" |
| 101 #endif | 102 #endif |
| (...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 780 | 781 |
| 781 void BrowserProcessImpl::CreateIOThread() { | 782 void BrowserProcessImpl::CreateIOThread() { |
| 782 DCHECK(!created_io_thread_ && io_thread_.get() == NULL); | 783 DCHECK(!created_io_thread_ && io_thread_.get() == NULL); |
| 783 created_io_thread_ = true; | 784 created_io_thread_ = true; |
| 784 | 785 |
| 785 // Prior to starting the io thread, we create the plugin service as | 786 // Prior to starting the io thread, we create the plugin service as |
| 786 // it is predominantly used from the io thread, but must be created | 787 // it is predominantly used from the io thread, but must be created |
| 787 // on the main thread. The service ctor is inexpensive and does not | 788 // on the main thread. The service ctor is inexpensive and does not |
| 788 // invoke the io_thread() accessor. | 789 // invoke the io_thread() accessor. |
| 789 PluginService* plugin_service = PluginService::GetInstance(); | 790 PluginService* plugin_service = PluginService::GetInstance(); |
| 791 plugin_service->Init(webkit::npapi::PluginList::Singleton()); | |
|
jam
2011/11/09 17:37:23
this won't work in the component build (since the
| |
| 790 plugin_service->set_filter(ChromePluginServiceFilter::GetInstance()); | 792 plugin_service->set_filter(ChromePluginServiceFilter::GetInstance()); |
| 791 plugin_service->StartWatchingPlugins(); | 793 plugin_service->StartWatchingPlugins(); |
| 792 | 794 |
| 793 // Register the internal Flash if available. | 795 // Register the internal Flash if available. |
| 794 FilePath path; | 796 FilePath path; |
| 795 if (!CommandLine::ForCurrentProcess()->HasSwitch( | 797 if (!CommandLine::ForCurrentProcess()->HasSwitch( |
| 796 switches::kDisableInternalFlash) && | 798 switches::kDisableInternalFlash) && |
| 797 PathService::Get(chrome::FILE_FLASH_PLUGIN, &path)) { | 799 PathService::Get(chrome::FILE_FLASH_PLUGIN, &path)) { |
| 798 plugin_service->AddExtraPluginPath(path); | 800 plugin_service->AddExtraPluginPath(path); |
| 799 } | 801 } |
| (...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1149 } | 1151 } |
| 1150 | 1152 |
| 1151 void BrowserProcessImpl::OnAutoupdateTimer() { | 1153 void BrowserProcessImpl::OnAutoupdateTimer() { |
| 1152 if (CanAutorestartForUpdate()) { | 1154 if (CanAutorestartForUpdate()) { |
| 1153 DLOG(WARNING) << "Detected update. Restarting browser."; | 1155 DLOG(WARNING) << "Detected update. Restarting browser."; |
| 1154 RestartBackgroundInstance(); | 1156 RestartBackgroundInstance(); |
| 1155 } | 1157 } |
| 1156 } | 1158 } |
| 1157 | 1159 |
| 1158 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 1160 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
| OLD | NEW |