diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-18 19:08:32 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-18 19:08:32 +0000 |
commit | a4a0bd9562e38ffff8aaf58031bdde0878ebfea4 (patch) | |
tree | 71f1db142ccb47e734c540d4dfc1963629a96b25 /chrome/browser/automation | |
parent | 1849d01a855914348bbdc07c7674764daf549358 (diff) | |
download | chromium_src-a4a0bd9562e38ffff8aaf58031bdde0878ebfea4.zip chromium_src-a4a0bd9562e38ffff8aaf58031bdde0878ebfea4.tar.gz chromium_src-a4a0bd9562e38ffff8aaf58031bdde0878ebfea4.tar.bz2 |
Make startup_tests build and work on Mac.
Also ensure that Chromium.app quits properly between the tests.
http://crbug.com/8391
Review URL: http://codereview.chromium.org/42306
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11998 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/automation')
4 files changed, 24 insertions, 0 deletions
diff --git a/chrome/browser/automation/automation_provider_list.cc b/chrome/browser/automation/automation_provider_list.cc index 4fbc395..9597e7a 100644 --- a/chrome/browser/automation/automation_provider_list.cc +++ b/chrome/browser/automation/automation_provider_list.cc @@ -37,6 +37,8 @@ bool AutomationProviderList::RemoveProvider(AutomationProvider* provider) { (*remove_provider)->Release(); automation_providers_.erase(remove_provider); g_browser_process->ReleaseModule(); + if (automation_providers_.empty()) + OnLastProviderRemoved(); return true; } return false; diff --git a/chrome/browser/automation/automation_provider_list.h b/chrome/browser/automation/automation_provider_list.h index 5e22d37..bedb6a6 100644 --- a/chrome/browser/automation/automation_provider_list.h +++ b/chrome/browser/automation/automation_provider_list.h @@ -37,6 +37,7 @@ class AutomationProviderList { private: AutomationProviderList(); + void OnLastProviderRemoved(); list_type automation_providers_; static AutomationProviderList* instance_; diff --git a/chrome/browser/automation/automation_provider_list_generic.cc b/chrome/browser/automation/automation_provider_list_generic.cc new file mode 100644 index 0000000..868d509 --- /dev/null +++ b/chrome/browser/automation/automation_provider_list_generic.cc @@ -0,0 +1,8 @@ +// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/browser/automation/automation_provider_list.h" + +void AutomationProviderList::OnLastProviderRemoved() { +} diff --git a/chrome/browser/automation/automation_provider_list_mac.mm b/chrome/browser/automation/automation_provider_list_mac.mm new file mode 100644 index 0000000..4d408fd --- /dev/null +++ b/chrome/browser/automation/automation_provider_list_mac.mm @@ -0,0 +1,13 @@ +// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/browser/automation/automation_provider_list.h" + +#import "chrome/browser/app_controller_mac.h" + +void AutomationProviderList::OnLastProviderRemoved() { + // We need to explicitly quit the application here because on Mac + // the controller holds an additional reference to g_browser_process. + [[NSApp delegate] quit:nil]; +} |