summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos/options
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/chromeos/options')
-rw-r--r--chrome/browser/chromeos/options/options_window_view.cc8
-rw-r--r--chrome/browser/chromeos/options/options_window_view.h3
2 files changed, 9 insertions, 2 deletions
diff --git a/chrome/browser/chromeos/options/options_window_view.cc b/chrome/browser/chromeos/options/options_window_view.cc
index 13c136d..c072787 100644
--- a/chrome/browser/chromeos/options/options_window_view.cc
+++ b/chrome/browser/chromeos/options/options_window_view.cc
@@ -301,6 +301,11 @@ OptionsPageView* OptionsWindowView::GetCurrentOptionsPageView() const {
}
}
+void CloseOptionsWindow() {
+ if (OptionsWindowView::instance_)
+ OptionsWindowView::instance_->window()->Close();
+}
+
gfx::NativeWindow GetOptionsViewParent() {
if (Browser* b = BrowserList::GetLastActive())
return b->window()->GetNativeHandle();
@@ -322,8 +327,7 @@ void ShowOptionsWindow(OptionsPage page,
// If there's already an existing options window, close it and create
// a new one for the current active browser.
- if (OptionsWindowView::instance_)
- OptionsWindowView::instance_->window()->Close();
+ chromeos::CloseOptionsWindow();
OptionsWindowView::instance_ = new OptionsWindowView(profile);
views::Window::CreateChromeWindow(chromeos::GetOptionsViewParent(),
diff --git a/chrome/browser/chromeos/options/options_window_view.h b/chrome/browser/chromeos/options/options_window_view.h
index abcc6ae..a6b31b6 100644
--- a/chrome/browser/chromeos/options/options_window_view.h
+++ b/chrome/browser/chromeos/options/options_window_view.h
@@ -7,6 +7,9 @@
namespace chromeos {
+// Closes the options dialog.
+void CloseOptionsWindow();
+
// Get a proper parent for options dialogs. This returns the last active browser
// window for now.
gfx::NativeWindow GetOptionsViewParent();