diff options
author | finnur@google.com <finnur@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-25 20:55:12 +0000 |
---|---|---|
committer | finnur@google.com <finnur@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-25 20:55:12 +0000 |
commit | f67500902a8fefd798915e0d257b342f16b10133 (patch) | |
tree | dc85102d1141c5a98d99b186c9cd79185a93d35d /chrome/browser/views/first_run_view_base.h | |
parent | a95783431c8cbc99981692cc0978af95cb3777af (diff) | |
download | chromium_src-f67500902a8fefd798915e0d257b342f16b10133.zip chromium_src-f67500902a8fefd798915e0d257b342f16b10133.tar.gz chromium_src-f67500902a8fefd798915e0d257b342f16b10133.tar.bz2 |
"Make Chrome your default browser" should now appear as a checkbox at the bottom of the First Run dialogs and be opt-out. Therefore I moved it from the FirstRunCustomizeView view to the FirstRunViewBase.
I also moved the override function for GetDialogButtonLabel to the base class (since both dialogs should have the same label for the OK button) and aligned the "Import" label vertically to the "Import" combobox.
Review URL: http://codereview.chromium.org/4244
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2605 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/first_run_view_base.h')
-rw-r--r-- | chrome/browser/views/first_run_view_base.h | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/chrome/browser/views/first_run_view_base.h b/chrome/browser/views/first_run_view_base.h index da0fe65..1d1d9a5 100644 --- a/chrome/browser/views/first_run_view_base.h +++ b/chrome/browser/views/first_run_view_base.h @@ -2,20 +2,19 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROME_BROWSER_VIEWS_FIRST_RUN_VIEW_BASE_H__ -#define CHROME_BROWSER_VIEWS_FIRST_RUN_VIEW_BASE_H__ +#ifndef CHROME_BROWSER_VIEWS_FIRST_RUN_VIEW_BASE_H_ +#define CHROME_BROWSER_VIEWS_FIRST_RUN_VIEW_BASE_H_ #include "chrome/browser/importer/importer.h" #include "chrome/views/dialog_delegate.h" #include "chrome/views/view.h" namespace ChromeViews { - +class CheckBox; class Window; class ImageView; class Separator; class Throbber; - } class Profile; @@ -39,6 +38,9 @@ class FirstRunViewBase : public ChromeViews::View, virtual bool IsAlwaysOnTop() const; virtual bool HasAlwaysOnTopMenu() const; + // Overridden from ChromeViews::DialogDelegate. + std::wstring GetDialogButtonLabel(DialogButton button) const; + protected: // Returns the items that the first run process is required to import // from other browsers. @@ -48,10 +50,13 @@ class FirstRunViewBase : public ChromeViews::View, bool CreateDesktopShortcut(); bool CreateQuickLaunchShortcut(); + // Set us as default browser if the user checked the box. + bool SetDefaultBrowser(); + // Modifies the chrome configuration so that the first-run dialogs are not // shown again. bool FirstRunComplete(); - + // Disables the standard buttons of the dialog. Useful when importing. void DisableButtons(); // Computes a tight dialog width given a contained UI element. @@ -72,6 +77,7 @@ class FirstRunViewBase : public ChromeViews::View, scoped_refptr<ImporterHost> importer_host_; Profile* profile_; + ChromeViews::CheckBox* default_browser_; private: // Initializes the controls on the dialog. @@ -81,8 +87,8 @@ class FirstRunViewBase : public ChromeViews::View, ChromeViews::Separator* separator_2_; int preferred_width_; - DISALLOW_EVIL_CONSTRUCTORS(FirstRunViewBase); + DISALLOW_COPY_AND_ASSIGN(FirstRunViewBase); }; -#endif // CHROME_BROWSER_VIEWS_FIRST_RUN_VIEW_BASE_H__ +#endif // CHROME_BROWSER_VIEWS_FIRST_RUN_VIEW_BASE_H_ |