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

Side by Side Diff: chrome/browser/automation/testing_automation_provider.cc

Issue 10409022: Move application lifetime functionality off BrowserList. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 | Annotate | Revision Log
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/automation/testing_automation_provider.h" 5 #include "chrome/browser/automation/testing_automation_provider.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 #include "chrome/browser/extensions/extension_process_manager.h" 55 #include "chrome/browser/extensions/extension_process_manager.h"
56 #include "chrome/browser/extensions/extension_service.h" 56 #include "chrome/browser/extensions/extension_service.h"
57 #include "chrome/browser/extensions/extension_tab_util.h" 57 #include "chrome/browser/extensions/extension_tab_util.h"
58 #include "chrome/browser/extensions/unpacked_installer.h" 58 #include "chrome/browser/extensions/unpacked_installer.h"
59 #include "chrome/browser/extensions/updater/extension_updater.h" 59 #include "chrome/browser/extensions/updater/extension_updater.h"
60 #include "chrome/browser/history/top_sites.h" 60 #include "chrome/browser/history/top_sites.h"
61 #include "chrome/browser/importer/importer_host.h" 61 #include "chrome/browser/importer/importer_host.h"
62 #include "chrome/browser/importer/importer_list.h" 62 #include "chrome/browser/importer/importer_list.h"
63 #include "chrome/browser/infobars/infobar_tab_helper.h" 63 #include "chrome/browser/infobars/infobar_tab_helper.h"
64 #include "chrome/browser/instant/instant_controller.h" 64 #include "chrome/browser/instant/instant_controller.h"
65 #include "chrome/browser/lifetime/application_lifetime.h"
65 #include "chrome/browser/notifications/balloon.h" 66 #include "chrome/browser/notifications/balloon.h"
66 #include "chrome/browser/notifications/balloon_collection.h" 67 #include "chrome/browser/notifications/balloon_collection.h"
67 #include "chrome/browser/notifications/notification.h" 68 #include "chrome/browser/notifications/notification.h"
68 #include "chrome/browser/notifications/notification_ui_manager.h" 69 #include "chrome/browser/notifications/notification_ui_manager.h"
69 #include "chrome/browser/password_manager/password_store.h" 70 #include "chrome/browser/password_manager/password_store.h"
70 #include "chrome/browser/password_manager/password_store_change.h" 71 #include "chrome/browser/password_manager/password_store_change.h"
71 #include "chrome/browser/password_manager/password_store_factory.h" 72 #include "chrome/browser/password_manager/password_store_factory.h"
72 #include "chrome/browser/platform_util.h" 73 #include "chrome/browser/platform_util.h"
73 #include "chrome/browser/plugin_prefs.h" 74 #include "chrome/browser/plugin_prefs.h"
74 #include "chrome/browser/prefs/pref_service.h" 75 #include "chrome/browser/prefs/pref_service.h"
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 IPC_MESSAGE_UNHANDLED( 445 IPC_MESSAGE_UNHANDLED(
445 handled = AutomationProvider::OnMessageReceived(message)) 446 handled = AutomationProvider::OnMessageReceived(message))
446 IPC_END_MESSAGE_MAP_EX() 447 IPC_END_MESSAGE_MAP_EX()
447 if (!deserialize_success) 448 if (!deserialize_success)
448 OnMessageDeserializationFailure(); 449 OnMessageDeserializationFailure();
449 return handled; 450 return handled;
450 } 451 }
451 452
452 void TestingAutomationProvider::OnChannelError() { 453 void TestingAutomationProvider::OnChannelError() {
453 if (!reinitialize_on_channel_error_ && 454 if (!reinitialize_on_channel_error_ &&
454 browser_shutdown::GetShutdownType() == browser_shutdown::NOT_VALID) 455 browser_shutdown::GetShutdownType() == browser_shutdown::NOT_VALID) {
455 BrowserList::AttemptExit(); 456 browser::AttemptExit();
457 }
456 AutomationProvider::OnChannelError(); 458 AutomationProvider::OnChannelError();
457 } 459 }
458 460
459 void TestingAutomationProvider::CloseBrowser(int browser_handle, 461 void TestingAutomationProvider::CloseBrowser(int browser_handle,
460 IPC::Message* reply_message) { 462 IPC::Message* reply_message) {
461 if (!browser_tracker_->ContainsHandle(browser_handle)) 463 if (!browser_tracker_->ContainsHandle(browser_handle))
462 return; 464 return;
463 465
464 Browser* browser = browser_tracker_->GetResource(browser_handle); 466 Browser* browser = browser_tracker_->GetResource(browser_handle);
465 new BrowserClosedNotificationObserver(browser, this, reply_message); 467 new BrowserClosedNotificationObserver(browser, this, reply_message);
(...skipping 6098 matching lines...) Expand 10 before | Expand all | Expand 10 after
6564 6566
6565 void TestingAutomationProvider::WaitForProcessLauncherThreadToGoIdle( 6567 void TestingAutomationProvider::WaitForProcessLauncherThreadToGoIdle(
6566 IPC::Message* reply_message) { 6568 IPC::Message* reply_message) {
6567 new WaitForProcessLauncherThreadToGoIdleObserver(this, reply_message); 6569 new WaitForProcessLauncherThreadToGoIdleObserver(this, reply_message);
6568 } 6570 }
6569 6571
6570 void TestingAutomationProvider::OnRemoveProvider() { 6572 void TestingAutomationProvider::OnRemoveProvider() {
6571 if (g_browser_process) 6573 if (g_browser_process)
6572 g_browser_process->GetAutomationProviderList()->RemoveProvider(this); 6574 g_browser_process->GetAutomationProviderList()->RemoveProvider(this);
6573 } 6575 }
OLDNEW
« no previous file with comments | « chrome/browser/app_controller_mac.mm ('k') | chrome/browser/background/background_mode_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698