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/browser_process_impl.h" | 5 #include "chrome/browser/browser_process_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <vector> | 10 #include <vector> |
(...skipping 17 matching lines...) Expand all Loading... |
28 #include "chrome/browser/component_updater/component_updater_configurator.h" | 28 #include "chrome/browser/component_updater/component_updater_configurator.h" |
29 #include "chrome/browser/component_updater/component_updater_service.h" | 29 #include "chrome/browser/component_updater/component_updater_service.h" |
30 #include "chrome/browser/defaults.h" | 30 #include "chrome/browser/defaults.h" |
31 #include "chrome/browser/devtools/remote_debugging_server.h" | 31 #include "chrome/browser/devtools/remote_debugging_server.h" |
32 #include "chrome/browser/download/download_request_limiter.h" | 32 #include "chrome/browser/download/download_request_limiter.h" |
33 #include "chrome/browser/download/download_status_updater.h" | 33 #include "chrome/browser/download/download_status_updater.h" |
34 #include "chrome/browser/extensions/event_router_forwarder.h" | 34 #include "chrome/browser/extensions/event_router_forwarder.h" |
35 #include "chrome/browser/extensions/extension_renderer_state.h" | 35 #include "chrome/browser/extensions/extension_renderer_state.h" |
36 #include "chrome/browser/first_run/upgrade_util.h" | 36 #include "chrome/browser/first_run/upgrade_util.h" |
37 #include "chrome/browser/gpu/gl_string_manager.h" | 37 #include "chrome/browser/gpu/gl_string_manager.h" |
| 38 #include "chrome/browser/gpu/gpu_mode_manager.h" |
38 #include "chrome/browser/icon_manager.h" | 39 #include "chrome/browser/icon_manager.h" |
39 #include "chrome/browser/idle.h" | 40 #include "chrome/browser/idle.h" |
40 #include "chrome/browser/intranet_redirect_detector.h" | 41 #include "chrome/browser/intranet_redirect_detector.h" |
41 #include "chrome/browser/io_thread.h" | 42 #include "chrome/browser/io_thread.h" |
42 #include "chrome/browser/lifetime/application_lifetime.h" | 43 #include "chrome/browser/lifetime/application_lifetime.h" |
43 #include "chrome/browser/media_galleries/media_file_system_registry.h" | 44 #include "chrome/browser/media_galleries/media_file_system_registry.h" |
44 #include "chrome/browser/metrics/metrics_service.h" | 45 #include "chrome/browser/metrics/metrics_service.h" |
45 #include "chrome/browser/metrics/thread_watcher.h" | 46 #include "chrome/browser/metrics/thread_watcher.h" |
46 #include "chrome/browser/metrics/variations/variations_service.h" | 47 #include "chrome/browser/metrics/variations/variations_service.h" |
47 #include "chrome/browser/net/chrome_net_log.h" | 48 #include "chrome/browser/net/chrome_net_log.h" |
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
499 return icon_manager_.get(); | 500 return icon_manager_.get(); |
500 } | 501 } |
501 | 502 |
502 GLStringManager* BrowserProcessImpl::gl_string_manager() { | 503 GLStringManager* BrowserProcessImpl::gl_string_manager() { |
503 DCHECK(CalledOnValidThread()); | 504 DCHECK(CalledOnValidThread()); |
504 if (!gl_string_manager_.get()) | 505 if (!gl_string_manager_.get()) |
505 gl_string_manager_.reset(new GLStringManager()); | 506 gl_string_manager_.reset(new GLStringManager()); |
506 return gl_string_manager_.get(); | 507 return gl_string_manager_.get(); |
507 } | 508 } |
508 | 509 |
| 510 GpuModeManager* BrowserProcessImpl::gpu_mode_manager() { |
| 511 DCHECK(CalledOnValidThread()); |
| 512 if (!gpu_mode_manager_.get()) |
| 513 gpu_mode_manager_.reset(new GpuModeManager()); |
| 514 return gpu_mode_manager_.get(); |
| 515 } |
| 516 |
509 RenderWidgetSnapshotTaker* BrowserProcessImpl::GetRenderWidgetSnapshotTaker() { | 517 RenderWidgetSnapshotTaker* BrowserProcessImpl::GetRenderWidgetSnapshotTaker() { |
510 return render_widget_snapshot_taker_.get(); | 518 return render_widget_snapshot_taker_.get(); |
511 } | 519 } |
512 | 520 |
513 AutomationProviderList* BrowserProcessImpl::GetAutomationProviderList() { | 521 AutomationProviderList* BrowserProcessImpl::GetAutomationProviderList() { |
514 DCHECK(CalledOnValidThread()); | 522 DCHECK(CalledOnValidThread()); |
515 #if defined(ENABLE_AUTOMATION) | 523 #if defined(ENABLE_AUTOMATION) |
516 if (automation_provider_list_.get() == NULL) | 524 if (automation_provider_list_.get() == NULL) |
517 automation_provider_list_.reset(new AutomationProviderList()); | 525 automation_provider_list_.reset(new AutomationProviderList()); |
518 return automation_provider_list_.get(); | 526 return automation_provider_list_.get(); |
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1029 } | 1037 } |
1030 | 1038 |
1031 void BrowserProcessImpl::OnAutoupdateTimer() { | 1039 void BrowserProcessImpl::OnAutoupdateTimer() { |
1032 if (CanAutorestartForUpdate()) { | 1040 if (CanAutorestartForUpdate()) { |
1033 DLOG(WARNING) << "Detected update. Restarting browser."; | 1041 DLOG(WARNING) << "Detected update. Restarting browser."; |
1034 RestartBackgroundInstance(); | 1042 RestartBackgroundInstance(); |
1035 } | 1043 } |
1036 } | 1044 } |
1037 | 1045 |
1038 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 1046 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
OLD | NEW |