diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-25 22:44:01 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-25 22:44:01 +0000 |
commit | 1a7eb41263d6ff70424e6effcf2188d3d8de85d5 (patch) | |
tree | 5a03ef6ca6b26dfed2c58a15e5b23fcfcb173176 /chrome/browser | |
parent | 1be01d9a5c5636e4e0bf527649c0e9c3d90da0db (diff) | |
download | chromium_src-1a7eb41263d6ff70424e6effcf2188d3d8de85d5.zip chromium_src-1a7eb41263d6ff70424e6effcf2188d3d8de85d5.tar.gz chromium_src-1a7eb41263d6ff70424e6effcf2188d3d8de85d5.tar.bz2 |
options: Get rid of ShowOptionsURL() function.
This function is only called once by gtk code, so is cheaper to move the code
there instead.
BUG=None
TEST=None
R=evan@chromium.org,sky@chromium.org
Review URL: http://codereview.chromium.org/6902007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82938 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/ui/gtk/instant_confirm_dialog_gtk.cc | 10 | ||||
-rw-r--r-- | chrome/browser/ui/options/show_options_url.cc | 21 | ||||
-rw-r--r-- | chrome/browser/ui/options/show_options_url.h | 20 |
3 files changed, 8 insertions, 43 deletions
diff --git a/chrome/browser/ui/gtk/instant_confirm_dialog_gtk.cc b/chrome/browser/ui/gtk/instant_confirm_dialog_gtk.cc index be432f75..0cdf899 100644 --- a/chrome/browser/ui/gtk/instant_confirm_dialog_gtk.cc +++ b/chrome/browser/ui/gtk/instant_confirm_dialog_gtk.cc @@ -9,9 +9,10 @@ #include "chrome/browser/instant/instant_confirm_dialog.h" #include "chrome/browser/instant/instant_controller.h" #include "chrome/browser/profiles/profile.h" +#include "chrome/browser/ui/browser.h" +#include "chrome/browser/ui/browser_window.h" #include "chrome/browser/ui/gtk/gtk_chrome_link_button.h" #include "chrome/browser/ui/gtk/gtk_util.h" -#include "chrome/browser/ui/options/show_options_url.h" #include "googleurl/src/gurl.h" #include "grit/chromium_strings.h" #include "grit/generated_resources.h" @@ -71,5 +72,10 @@ void InstantConfirmDialogGtk::OnResponse(GtkWidget* dialog, int response_id) { } void InstantConfirmDialogGtk::OnLinkButtonClicked(GtkWidget* button) { - browser::ShowOptionsURL(profile_, browser::InstantLearnMoreURL()); + // We open a new browser window so the Options dialog doesn't get lost behind + // other windows. + Browser* browser = Browser::Create(profile_); + browser->AddSelectedTabWithURL(browser::InstantLearnMoreURL(), + PageTransition::LINK); + browser->window()->Show(); } diff --git a/chrome/browser/ui/options/show_options_url.cc b/chrome/browser/ui/options/show_options_url.cc deleted file mode 100644 index 2b4818f..0000000 --- a/chrome/browser/ui/options/show_options_url.cc +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2010 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/ui/options/show_options_url.h" - -#include "chrome/browser/profiles/profile.h" -#include "chrome/browser/ui/browser.h" -#include "chrome/browser/ui/browser_window.h" - -namespace browser { - -void ShowOptionsURL(Profile* profile, const GURL& url) { - // We open a new browser window so the Options dialog doesn't get lost behind - // other windows. - Browser* browser = Browser::Create(profile); - browser->AddSelectedTabWithURL(url, PageTransition::LINK); - browser->window()->Show(); -} - -} // namespace browser diff --git a/chrome/browser/ui/options/show_options_url.h b/chrome/browser/ui/options/show_options_url.h deleted file mode 100644 index e849169..0000000 --- a/chrome/browser/ui/options/show_options_url.h +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2010 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. - -#ifndef CHROME_BROWSER_UI_OPTIONS_SHOW_OPTIONS_URL_H_ -#define CHROME_BROWSER_UI_OPTIONS_SHOW_OPTIONS_URL_H_ -#pragma once - -class GURL; -class Profile; - -namespace browser { - -// Opens a tab showing the specified url. This is intended for use any place -// we show a URL in the options dialogs. -void ShowOptionsURL(Profile* profile, const GURL& url); - -} // namespace browser - -#endif // CHROME_BROWSER_UI_OPTIONS_SHOW_OPTIONS_URL_H_ |