| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_VIEWS_FIRST_RUN_VIEW_H_ | 5 #ifndef CHROME_BROWSER_VIEWS_FIRST_RUN_VIEW_H_ |
| 6 #define CHROME_BROWSER_VIEWS_FIRST_RUN_VIEW_H_ | 6 #define CHROME_BROWSER_VIEWS_FIRST_RUN_VIEW_H_ |
| 7 | 7 |
| 8 #include "chrome/browser/views/first_run_view_base.h" | 8 #include "chrome/browser/views/first_run_view_base.h" |
| 9 #include "chrome/browser/views/first_run_customize_view.h" | 9 #include "chrome/browser/views/first_run_customize_view.h" |
| 10 #include "chrome/browser/views/first_run_search_engine_view.h" | 10 #include "chrome/browser/views/first_run_search_engine_view.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 | 23 |
| 24 // FirstRunView implements the dialog that welcomes to user to Chrome after | 24 // FirstRunView implements the dialog that welcomes to user to Chrome after |
| 25 // a fresh install. | 25 // a fresh install. |
| 26 class FirstRunView : public FirstRunViewBase, | 26 class FirstRunView : public FirstRunViewBase, |
| 27 public views::LinkController, | 27 public views::LinkController, |
| 28 public FirstRunCustomizeView::CustomizeViewObserver, | 28 public FirstRunCustomizeView::CustomizeViewObserver, |
| 29 public SearchEngineSelectionObserver { | 29 public SearchEngineSelectionObserver { |
| 30 public: | 30 public: |
| 31 explicit FirstRunView(Profile* profile, bool homepage_defined, | 31 explicit FirstRunView(Profile* profile, bool homepage_defined, |
| 32 int import_items, int dont_import_items, | 32 int import_items, int dont_import_items, |
| 33 bool search_engine_experiment); | 33 bool search_engine_experiment, |
| 34 bool randomize_search_engine_experiment); |
| 34 virtual ~FirstRunView(); | 35 virtual ~FirstRunView(); |
| 35 | 36 |
| 36 bool accepted() const { return accepted_;} | 37 bool accepted() const { return accepted_;} |
| 37 | 38 |
| 38 // Overridden from views::View: | 39 // Overridden from views::View: |
| 39 virtual gfx::Size GetPreferredSize(); | 40 virtual gfx::Size GetPreferredSize(); |
| 40 virtual void Layout(); | 41 virtual void Layout(); |
| 41 | 42 |
| 42 // Overridden from views::DialogDelegate: | 43 // Overridden from views::DialogDelegate: |
| 43 virtual bool Accept(); | 44 virtual bool Accept(); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 57 // Overridden from SearchEngineSelectionObserver: | 58 // Overridden from SearchEngineSelectionObserver: |
| 58 virtual void SearchEngineChosen(const TemplateURL* default_search); | 59 virtual void SearchEngineChosen(const TemplateURL* default_search); |
| 59 | 60 |
| 60 private: | 61 private: |
| 61 // Initializes the controls on the dialog. | 62 // Initializes the controls on the dialog. |
| 62 void SetupControls(); | 63 void SetupControls(); |
| 63 | 64 |
| 64 // Creates the dialog that allows the user to customize work items. | 65 // Creates the dialog that allows the user to customize work items. |
| 65 void OpenCustomizeDialog(); | 66 void OpenCustomizeDialog(); |
| 66 | 67 |
| 67 // Creates the search engine selection dialog. | 68 // Creates the search engine selection dialog. If |randomize|, the display |
| 68 void OpenSearchEngineDialog(); | 69 // of search engine logos should be randomized. |
| 70 void OpenSearchEngineDialog(bool randomize); |
| 69 | 71 |
| 70 views::Label* welcome_label_; | 72 views::Label* welcome_label_; |
| 71 views::Label* actions_label_; | 73 views::Label* actions_label_; |
| 72 views::Label* actions_import_; | 74 views::Label* actions_import_; |
| 73 views::Label* actions_shorcuts_; | 75 views::Label* actions_shorcuts_; |
| 74 views::Link* customize_link_; | 76 views::Link* customize_link_; |
| 75 bool customize_selected_; | 77 bool customize_selected_; |
| 76 | 78 |
| 77 // Whether the user accepted (pressed the "Start" button as opposed to | 79 // Whether the user accepted (pressed the "Start" button as opposed to |
| 78 // "Cancel"). | 80 // "Cancel"). |
| 79 bool accepted_; | 81 bool accepted_; |
| 80 | 82 |
| 81 DISALLOW_COPY_AND_ASSIGN(FirstRunView); | 83 DISALLOW_COPY_AND_ASSIGN(FirstRunView); |
| 82 }; | 84 }; |
| 83 | 85 |
| 84 #endif // CHROME_BROWSER_VIEWS_FIRST_RUN_VIEW_H_ | 86 #endif // CHROME_BROWSER_VIEWS_FIRST_RUN_VIEW_H_ |
| OLD | NEW |