summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos/options
diff options
context:
space:
mode:
authorxiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-17 16:49:57 +0000
committerxiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-17 16:49:57 +0000
commit5d370d7520da006443a57490b5419f84d78e9e86 (patch)
treedef057d065926cddb4eef0c80af49a066eba9a8f /chrome/browser/chromeos/options
parent1a474191be022e293b6f869c398bab5b30be6540 (diff)
downloadchromium_src-5d370d7520da006443a57490b5419f84d78e9e86.zip
chromium_src-5d370d7520da006443a57490b5419f84d78e9e86.tar.gz
chromium_src-5d370d7520da006443a57490b5419f84d78e9e86.tar.bz2
Close options dialog when "Get Theme" is clicked.
BUG=chromium-os:3061 TEST=Verify options dialog is closed when "Get Theme" link is clicked per chromium-os:3061. Review URL: http://codereview.chromium.org/2090003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47423 0039d316-1c4b-4281-b951-d872f2087c98
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();