| 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 #include "chrome/browser/printing/print_job_manager.h" | 59 #include "chrome/browser/printing/print_job_manager.h" |
| 60 #include "chrome/browser/printing/print_preview_dialog_controller.h" | 60 #include "chrome/browser/printing/print_preview_dialog_controller.h" |
| 61 #include "chrome/browser/profiles/profile_manager.h" | 61 #include "chrome/browser/profiles/profile_manager.h" |
| 62 #include "chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.
h" | 62 #include "chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.
h" |
| 63 #include "chrome/browser/safe_browsing/safe_browsing_service.h" | 63 #include "chrome/browser/safe_browsing/safe_browsing_service.h" |
| 64 #include "chrome/browser/shell_integration.h" | 64 #include "chrome/browser/shell_integration.h" |
| 65 #include "chrome/browser/status_icons/status_tray.h" | 65 #include "chrome/browser/status_icons/status_tray.h" |
| 66 #include "chrome/browser/thumbnails/render_widget_snapshot_taker.h" | 66 #include "chrome/browser/thumbnails/render_widget_snapshot_taker.h" |
| 67 #include "chrome/browser/ui/bookmarks/bookmark_prompt_controller.h" | 67 #include "chrome/browser/ui/bookmarks/bookmark_prompt_controller.h" |
| 68 #include "chrome/browser/ui/browser_finder.h" | 68 #include "chrome/browser/ui/browser_finder.h" |
| 69 #include "chrome/browser/ui/color_chooser_controller.h" |
| 69 #include "chrome/browser/web_resource/promo_resource_service.h" | 70 #include "chrome/browser/web_resource/promo_resource_service.h" |
| 70 #include "chrome/common/chrome_constants.h" | 71 #include "chrome/common/chrome_constants.h" |
| 71 #include "chrome/common/chrome_notification_types.h" | 72 #include "chrome/common/chrome_notification_types.h" |
| 72 #include "chrome/common/chrome_paths.h" | 73 #include "chrome/common/chrome_paths.h" |
| 73 #include "chrome/common/chrome_switches.h" | 74 #include "chrome/common/chrome_switches.h" |
| 74 #include "chrome/common/extensions/extension_l10n_util.h" | 75 #include "chrome/common/extensions/extension_l10n_util.h" |
| 75 #include "chrome/common/pref_names.h" | 76 #include "chrome/common/pref_names.h" |
| 76 #include "chrome/common/switch_utils.h" | 77 #include "chrome/common/switch_utils.h" |
| 77 #include "chrome/common/url_constants.h" | 78 #include "chrome/common/url_constants.h" |
| 78 #include "chrome/installer/util/google_update_constants.h" | 79 #include "chrome/installer/util/google_update_constants.h" |
| (...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 618 } | 619 } |
| 619 | 620 |
| 620 BookmarkPromptController* BrowserProcessImpl::bookmark_prompt_controller() { | 621 BookmarkPromptController* BrowserProcessImpl::bookmark_prompt_controller() { |
| 621 #if defined(OS_ANDROID) | 622 #if defined(OS_ANDROID) |
| 622 return NULL; | 623 return NULL; |
| 623 #else | 624 #else |
| 624 return bookmark_prompt_controller_.get(); | 625 return bookmark_prompt_controller_.get(); |
| 625 #endif | 626 #endif |
| 626 } | 627 } |
| 627 | 628 |
| 629 ColorChooserController* BrowserProcessImpl::color_chooser_controller() { |
| 630 return color_chooser_controller_.get(); |
| 631 } |
| 632 |
| 628 chrome::MediaFileSystemRegistry* | 633 chrome::MediaFileSystemRegistry* |
| 629 BrowserProcessImpl::media_file_system_registry() { | 634 BrowserProcessImpl::media_file_system_registry() { |
| 630 if (!media_file_system_registry_) | 635 if (!media_file_system_registry_) |
| 631 media_file_system_registry_.reset(new chrome::MediaFileSystemRegistry()); | 636 media_file_system_registry_.reset(new chrome::MediaFileSystemRegistry()); |
| 632 return media_file_system_registry_.get(); | 637 return media_file_system_registry_.get(); |
| 633 } | 638 } |
| 634 | 639 |
| 635 #if !defined(OS_WIN) | 640 #if !defined(OS_WIN) |
| 636 void BrowserProcessImpl::PlatformSpecificCommandLineProcessing( | 641 void BrowserProcessImpl::PlatformSpecificCommandLineProcessing( |
| 637 const CommandLine& command_line) { | 642 const CommandLine& command_line) { |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 901 promo_resource_service_->StartAfterDelay(); | 906 promo_resource_service_->StartAfterDelay(); |
| 902 } | 907 } |
| 903 | 908 |
| 904 #if !defined(OS_ANDROID) | 909 #if !defined(OS_ANDROID) |
| 905 if (browser_defaults::bookmarks_enabled && | 910 if (browser_defaults::bookmarks_enabled && |
| 906 BookmarkPromptController::IsEnabled()) { | 911 BookmarkPromptController::IsEnabled()) { |
| 907 bookmark_prompt_controller_.reset(new BookmarkPromptController()); | 912 bookmark_prompt_controller_.reset(new BookmarkPromptController()); |
| 908 } | 913 } |
| 909 #endif | 914 #endif |
| 910 | 915 |
| 916 color_chooser_controller_.reset(new ColorChooserController()); |
| 917 |
| 911 #if defined(OS_MACOSX) | 918 #if defined(OS_MACOSX) |
| 912 app_shim_host_manager_.reset(new AppShimHostManager); | 919 app_shim_host_manager_.reset(new AppShimHostManager); |
| 913 #endif | 920 #endif |
| 914 } | 921 } |
| 915 | 922 |
| 916 void BrowserProcessImpl::CreateIconManager() { | 923 void BrowserProcessImpl::CreateIconManager() { |
| 917 DCHECK(!created_icon_manager_ && icon_manager_.get() == NULL); | 924 DCHECK(!created_icon_manager_ && icon_manager_.get() == NULL); |
| 918 created_icon_manager_ = true; | 925 created_icon_manager_ = true; |
| 919 icon_manager_.reset(new IconManager); | 926 icon_manager_.reset(new IconManager); |
| 920 } | 927 } |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1052 } | 1059 } |
| 1053 | 1060 |
| 1054 void BrowserProcessImpl::OnAutoupdateTimer() { | 1061 void BrowserProcessImpl::OnAutoupdateTimer() { |
| 1055 if (CanAutorestartForUpdate()) { | 1062 if (CanAutorestartForUpdate()) { |
| 1056 DLOG(WARNING) << "Detected update. Restarting browser."; | 1063 DLOG(WARNING) << "Detected update. Restarting browser."; |
| 1057 RestartBackgroundInstance(); | 1064 RestartBackgroundInstance(); |
| 1058 } | 1065 } |
| 1059 } | 1066 } |
| 1060 | 1067 |
| 1061 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 1068 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
| OLD | NEW |