summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--content/shell/browser/shell.cc1
-rw-r--r--content/shell/browser/shell.h5
-rw-r--r--content/shell/browser/shell_android.cc3
-rw-r--r--content/shell/browser/shell_browser_main_parts.cc3
-rw-r--r--content/shell/browser/shell_gtk.cc3
-rw-r--r--content/shell/browser/shell_mac.mm3
-rw-r--r--content/shell/browser/shell_views.cc5
7 files changed, 12 insertions, 11 deletions
diff --git a/content/shell/browser/shell.cc b/content/shell/browser/shell.cc
index 3969186..f9e63e1 100644
--- a/content/shell/browser/shell.cc
+++ b/content/shell/browser/shell.cc
@@ -123,6 +123,7 @@ void Shell::CloseAllWindows() {
std::vector<Shell*> open_windows(windows_);
for (size_t i = 0; i < open_windows.size(); ++i)
open_windows[i]->Close();
+ PlatformExit();
base::MessageLoop::current()->RunUntilIdle();
}
diff --git a/content/shell/browser/shell.h b/content/shell/browser/shell.h
index 0b9fe7f..20515f6 100644
--- a/content/shell/browser/shell.h
+++ b/content/shell/browser/shell.h
@@ -93,9 +93,6 @@ class Shell : public WebContentsDelegate,
// Closes all windows and returns. This runs a message loop.
static void CloseAllWindows();
- // Closes all windows and exits.
- static void PlatformExit();
-
// Used for content_browsertests. Called once.
static void SetShellCreatedCallback(
base::Callback<void(Shell*)> shell_created_callback);
@@ -170,6 +167,8 @@ class Shell : public WebContentsDelegate,
// Helper for one time initialization of application
static void PlatformInitialize(const gfx::Size& default_window_size);
+ // Helper for one time deinitialization of platform specific state.
+ static void PlatformExit();
// Adjust the size when Blink sends 0 for width and/or height.
// This happens when Blink requests a default-sized window.
diff --git a/content/shell/browser/shell_android.cc b/content/shell/browser/shell_android.cc
index 5c1b4b5..5cea4c1 100644
--- a/content/shell/browser/shell_android.cc
+++ b/content/shell/browser/shell_android.cc
@@ -26,6 +26,9 @@ void Shell::PlatformInitialize(const gfx::Size& default_window_size) {
DCHECK(command_line->HasSwitch(switches::kEnableThreadedCompositing));
}
+void Shell::PlatformExit() {
+}
+
void Shell::PlatformCleanUp() {
}
diff --git a/content/shell/browser/shell_browser_main_parts.cc b/content/shell/browser/shell_browser_main_parts.cc
index 8415ced..a413393 100644
--- a/content/shell/browser/shell_browser_main_parts.cc
+++ b/content/shell/browser/shell_browser_main_parts.cc
@@ -180,9 +180,6 @@ bool ShellBrowserMainParts::MainMessageLoopRun(int* result_code) {
}
void ShellBrowserMainParts::PostMainMessageLoopRun() {
-#if defined(USE_AURA)
- Shell::PlatformExit();
-#endif
if (devtools_delegate_)
devtools_delegate_->Stop();
browser_context_.reset();
diff --git a/content/shell/browser/shell_gtk.cc b/content/shell/browser/shell_gtk.cc
index e6fc85c..66d17ce7 100644
--- a/content/shell/browser/shell_gtk.cc
+++ b/content/shell/browser/shell_gtk.cc
@@ -58,6 +58,9 @@ GtkWidget* CreateMenuBar(Shell* shell) {
void Shell::PlatformInitialize(const gfx::Size& default_window_size) {
}
+void Shell::PlatformExit() {
+}
+
void Shell::PlatformCleanUp() {
// Nothing to clean up; GTK will clean up the widgets shortly after.
}
diff --git a/content/shell/browser/shell_mac.mm b/content/shell/browser/shell_mac.mm
index 3926aa5..335f4af 100644
--- a/content/shell/browser/shell_mac.mm
+++ b/content/shell/browser/shell_mac.mm
@@ -127,6 +127,9 @@ namespace content {
void Shell::PlatformInitialize(const gfx::Size& default_window_size) {
}
+void Shell::PlatformExit() {
+}
+
void Shell::PlatformCleanUp() {
}
diff --git a/content/shell/browser/shell_views.cc b/content/shell/browser/shell_views.cc
index eb364f7..273eef6 100644
--- a/content/shell/browser/shell_views.cc
+++ b/content/shell/browser/shell_views.cc
@@ -315,11 +315,6 @@ void Shell::PlatformInitialize(const gfx::Size& default_window_size) {
}
void Shell::PlatformExit() {
- std::vector<Shell*> windows = windows_;
- for (std::vector<Shell*>::iterator it = windows.begin();
- it != windows.end(); ++it) {
- (*it)->window_widget_->Close();
- }
#if defined(OS_CHROMEOS)
if (wm_test_helper_)
delete wm_test_helper_;