| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 #include "content/browser/download/mhtml_generation_manager.h" | 74 #include "content/browser/download/mhtml_generation_manager.h" |
| 75 #include "content/browser/download/save_file_manager.h" | 75 #include "content/browser/download/save_file_manager.h" |
| 76 #include "content/browser/gpu/gpu_process_host_ui_shim.h" | 76 #include "content/browser/gpu/gpu_process_host_ui_shim.h" |
| 77 #include "content/browser/net/browser_online_state_observer.h" | 77 #include "content/browser/net/browser_online_state_observer.h" |
| 78 #include "content/browser/plugin_service.h" | 78 #include "content/browser/plugin_service.h" |
| 79 #include "content/browser/renderer_host/resource_dispatcher_host.h" | 79 #include "content/browser/renderer_host/resource_dispatcher_host.h" |
| 80 #include "content/public/browser/browser_thread.h" | 80 #include "content/public/browser/browser_thread.h" |
| 81 #include "content/public/browser/notification_details.h" | 81 #include "content/public/browser/notification_details.h" |
| 82 #include "content/public/browser/render_process_host.h" | 82 #include "content/public/browser/render_process_host.h" |
| 83 #include "content/public/common/url_fetcher.h" | 83 #include "content/public/common/url_fetcher.h" |
| 84 #include "media/audio/audio_manager.h" |
| 84 #include "net/socket/client_socket_pool_manager.h" | 85 #include "net/socket/client_socket_pool_manager.h" |
| 85 #include "net/url_request/url_request_context_getter.h" | 86 #include "net/url_request/url_request_context_getter.h" |
| 86 #include "ui/base/clipboard/clipboard.h" | 87 #include "ui/base/clipboard/clipboard.h" |
| 87 #include "ui/base/l10n/l10n_util.h" | 88 #include "ui/base/l10n/l10n_util.h" |
| 88 | 89 |
| 89 #if defined(OS_WIN) | 90 #if defined(OS_WIN) |
| 90 #include "ui/views/focus/view_storage.h" | 91 #include "ui/views/focus/view_storage.h" |
| 91 #elif defined(OS_MACOSX) | 92 #elif defined(OS_MACOSX) |
| 92 #include "chrome/browser/chrome_browser_main_mac.h" | 93 #include "chrome/browser/chrome_browser_main_mac.h" |
| 93 #endif | 94 #endif |
| (...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 708 // either. | 709 // either. |
| 709 return NULL; | 710 return NULL; |
| 710 #else | 711 #else |
| 711 if (!crl_set_fetcher_.get()) { | 712 if (!crl_set_fetcher_.get()) { |
| 712 crl_set_fetcher_ = new CRLSetFetcher(); | 713 crl_set_fetcher_ = new CRLSetFetcher(); |
| 713 } | 714 } |
| 714 return crl_set_fetcher_.get(); | 715 return crl_set_fetcher_.get(); |
| 715 #endif | 716 #endif |
| 716 } | 717 } |
| 717 | 718 |
| 719 AudioManager* BrowserProcessImpl::audio_manager() { |
| 720 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 721 if (!audio_manager_.get()) |
| 722 audio_manager_ = AudioManager::Create(); |
| 723 |
| 724 return audio_manager_.get(); |
| 725 } |
| 726 |
| 718 void BrowserProcessImpl::CreateResourceDispatcherHost() { | 727 void BrowserProcessImpl::CreateResourceDispatcherHost() { |
| 719 DCHECK(!created_resource_dispatcher_host_ && | 728 DCHECK(!created_resource_dispatcher_host_ && |
| 720 resource_dispatcher_host_.get() == NULL); | 729 resource_dispatcher_host_.get() == NULL); |
| 721 created_resource_dispatcher_host_ = true; | 730 created_resource_dispatcher_host_ = true; |
| 722 | 731 |
| 723 // UserScriptListener and NetworkDelayListener will delete themselves. | 732 // UserScriptListener and NetworkDelayListener will delete themselves. |
| 724 ResourceQueue::DelegateSet resource_queue_delegates; | 733 ResourceQueue::DelegateSet resource_queue_delegates; |
| 725 resource_queue_delegates.insert(new UserScriptListener()); | 734 resource_queue_delegates.insert(new UserScriptListener()); |
| 726 resource_queue_delegates.insert(new NetworkDelayListener()); | 735 resource_queue_delegates.insert(new NetworkDelayListener()); |
| 727 | 736 |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 990 } | 999 } |
| 991 | 1000 |
| 992 void BrowserProcessImpl::OnAutoupdateTimer() { | 1001 void BrowserProcessImpl::OnAutoupdateTimer() { |
| 993 if (CanAutorestartForUpdate()) { | 1002 if (CanAutorestartForUpdate()) { |
| 994 DLOG(WARNING) << "Detected update. Restarting browser."; | 1003 DLOG(WARNING) << "Detected update. Restarting browser."; |
| 995 RestartBackgroundInstance(); | 1004 RestartBackgroundInstance(); |
| 996 } | 1005 } |
| 997 } | 1006 } |
| 998 | 1007 |
| 999 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 1008 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
| OLD | NEW |