Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(46)

Side by Side Diff: chrome/browser/browser_process_impl.cc

Issue 1152613003: Implement sidebar support for extension action popups (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <vector> 9 #include <vector>
10 10
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 #include "chrome/browser/plugins/plugin_finder.h" 52 #include "chrome/browser/plugins/plugin_finder.h"
53 #include "chrome/browser/prefs/browser_prefs.h" 53 #include "chrome/browser/prefs/browser_prefs.h"
54 #include "chrome/browser/prefs/chrome_pref_service_factory.h" 54 #include "chrome/browser/prefs/chrome_pref_service_factory.h"
55 #include "chrome/browser/printing/background_printing_manager.h" 55 #include "chrome/browser/printing/background_printing_manager.h"
56 #include "chrome/browser/printing/print_job_manager.h" 56 #include "chrome/browser/printing/print_job_manager.h"
57 #include "chrome/browser/printing/print_preview_dialog_controller.h" 57 #include "chrome/browser/printing/print_preview_dialog_controller.h"
58 #include "chrome/browser/profiles/profile_manager.h" 58 #include "chrome/browser/profiles/profile_manager.h"
59 #include "chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate. h" 59 #include "chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate. h"
60 #include "chrome/browser/safe_browsing/safe_browsing_service.h" 60 #include "chrome/browser/safe_browsing/safe_browsing_service.h"
61 #include "chrome/browser/shell_integration.h" 61 #include "chrome/browser/shell_integration.h"
62 #include "chrome/browser/sidebar/sidebar_manager.h"
62 #include "chrome/browser/status_icons/status_tray.h" 63 #include "chrome/browser/status_icons/status_tray.h"
63 #include "chrome/browser/ui/browser_dialogs.h" 64 #include "chrome/browser/ui/browser_dialogs.h"
64 #include "chrome/browser/ui/browser_finder.h" 65 #include "chrome/browser/ui/browser_finder.h"
65 #include "chrome/browser/ui/user_manager.h" 66 #include "chrome/browser/ui/user_manager.h"
66 #include "chrome/browser/update_client/chrome_update_query_params_delegate.h" 67 #include "chrome/browser/update_client/chrome_update_query_params_delegate.h"
67 #include "chrome/browser/web_resource/promo_resource_service.h" 68 #include "chrome/browser/web_resource/promo_resource_service.h"
68 #include "chrome/common/chrome_constants.h" 69 #include "chrome/common/chrome_constants.h"
69 #include "chrome/common/chrome_paths.h" 70 #include "chrome/common/chrome_paths.h"
70 #include "chrome/common/chrome_switches.h" 71 #include "chrome/common/chrome_switches.h"
71 #include "chrome/common/extensions/chrome_extensions_client.h" 72 #include "chrome/common/extensions/chrome_extensions_client.h"
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 using content::ResourceDispatcherHost; 168 using content::ResourceDispatcherHost;
168 169
169 BrowserProcessImpl::BrowserProcessImpl( 170 BrowserProcessImpl::BrowserProcessImpl(
170 base::SequencedTaskRunner* local_state_task_runner, 171 base::SequencedTaskRunner* local_state_task_runner,
171 const base::CommandLine& command_line) 172 const base::CommandLine& command_line)
172 : created_watchdog_thread_(false), 173 : created_watchdog_thread_(false),
173 created_browser_policy_connector_(false), 174 created_browser_policy_connector_(false),
174 created_profile_manager_(false), 175 created_profile_manager_(false),
175 created_local_state_(false), 176 created_local_state_(false),
176 created_icon_manager_(false), 177 created_icon_manager_(false),
178 created_sidebar_manager_(false),
177 created_notification_ui_manager_(false), 179 created_notification_ui_manager_(false),
178 created_safe_browsing_service_(false), 180 created_safe_browsing_service_(false),
179 module_ref_count_(0), 181 module_ref_count_(0),
180 did_start_(false), 182 did_start_(false),
181 download_status_updater_(new DownloadStatusUpdater), 183 download_status_updater_(new DownloadStatusUpdater),
182 local_state_task_runner_(local_state_task_runner) { 184 local_state_task_runner_(local_state_task_runner) {
183 g_browser_process = this; 185 g_browser_process = this;
184 platform_part_.reset(new BrowserProcessPlatformPart()); 186 platform_part_.reset(new BrowserProcessPlatformPart());
185 187
186 #if defined(ENABLE_PRINTING) 188 #if defined(ENABLE_PRINTING)
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 return profile_manager_.get(); 562 return profile_manager_.get();
561 } 563 }
562 564
563 PrefService* BrowserProcessImpl::local_state() { 565 PrefService* BrowserProcessImpl::local_state() {
564 DCHECK(CalledOnValidThread()); 566 DCHECK(CalledOnValidThread());
565 if (!created_local_state_) 567 if (!created_local_state_)
566 CreateLocalState(); 568 CreateLocalState();
567 return local_state_.get(); 569 return local_state_.get();
568 } 570 }
569 571
572 SidebarManager* BrowserProcessImpl::sidebar_manager() {
573 DCHECK(CalledOnValidThread());
574 if (!created_sidebar_manager_)
575 CreateSidebarManager();
576 return sidebar_manager_.get();
577 }
578
570 net::URLRequestContextGetter* BrowserProcessImpl::system_request_context() { 579 net::URLRequestContextGetter* BrowserProcessImpl::system_request_context() {
571 DCHECK(CalledOnValidThread()); 580 DCHECK(CalledOnValidThread());
572 return io_thread()->system_url_request_context_getter(); 581 return io_thread()->system_url_request_context_getter();
573 } 582 }
574 583
575 chrome_variations::VariationsService* BrowserProcessImpl::variations_service() { 584 chrome_variations::VariationsService* BrowserProcessImpl::variations_service() {
576 DCHECK(CalledOnValidThread()); 585 DCHECK(CalledOnValidThread());
577 return GetMetricsServicesManager()->GetVariationsService(); 586 return GetMetricsServicesManager()->GetVariationsService();
578 } 587 }
579 588
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
1068 1077
1069 platform_part_->PreMainMessageLoopRun(); 1078 platform_part_->PreMainMessageLoopRun();
1070 } 1079 }
1071 1080
1072 void BrowserProcessImpl::CreateIconManager() { 1081 void BrowserProcessImpl::CreateIconManager() {
1073 DCHECK(!created_icon_manager_ && icon_manager_.get() == NULL); 1082 DCHECK(!created_icon_manager_ && icon_manager_.get() == NULL);
1074 created_icon_manager_ = true; 1083 created_icon_manager_ = true;
1075 icon_manager_.reset(new IconManager); 1084 icon_manager_.reset(new IconManager);
1076 } 1085 }
1077 1086
1087 void BrowserProcessImpl::CreateSidebarManager() {
1088 DCHECK(!created_sidebar_manager_ && sidebar_manager_.get() == NULL);
1089 created_sidebar_manager_ = true;
1090 sidebar_manager_ = new SidebarManager();
1091 }
1092
1078 void BrowserProcessImpl::CreateIntranetRedirectDetector() { 1093 void BrowserProcessImpl::CreateIntranetRedirectDetector() {
1079 DCHECK(intranet_redirect_detector_.get() == NULL); 1094 DCHECK(intranet_redirect_detector_.get() == NULL);
1080 scoped_ptr<IntranetRedirectDetector> intranet_redirect_detector( 1095 scoped_ptr<IntranetRedirectDetector> intranet_redirect_detector(
1081 new IntranetRedirectDetector); 1096 new IntranetRedirectDetector);
1082 intranet_redirect_detector_.swap(intranet_redirect_detector); 1097 intranet_redirect_detector_.swap(intranet_redirect_detector);
1083 } 1098 }
1084 1099
1085 void BrowserProcessImpl::CreateNotificationUIManager() { 1100 void BrowserProcessImpl::CreateNotificationUIManager() {
1086 #if defined(ENABLE_NOTIFICATIONS) 1101 #if defined(ENABLE_NOTIFICATIONS)
1087 DCHECK(notification_ui_manager_.get() == NULL); 1102 DCHECK(notification_ui_manager_.get() == NULL);
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
1229 } 1244 }
1230 1245
1231 void BrowserProcessImpl::OnAutoupdateTimer() { 1246 void BrowserProcessImpl::OnAutoupdateTimer() {
1232 if (CanAutorestartForUpdate()) { 1247 if (CanAutorestartForUpdate()) {
1233 DLOG(WARNING) << "Detected update. Restarting browser."; 1248 DLOG(WARNING) << "Detected update. Restarting browser.";
1234 RestartBackgroundInstance(); 1249 RestartBackgroundInstance();
1235 } 1250 }
1236 } 1251 }
1237 1252
1238 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) 1253 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698