Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(178)

Side by Side Diff: chrome/browser/views/first_run_search_engine_view.h

Issue 2808006: Allow randomized search engines in selection dialog.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_SEARCH_ENGINE_VIEW_H_ 5 #ifndef CHROME_BROWSER_VIEWS_FIRST_RUN_SEARCH_ENGINE_VIEW_H_
6 #define CHROME_BROWSER_VIEWS_FIRST_RUN_SEARCH_ENGINE_VIEW_H_ 6 #define CHROME_BROWSER_VIEWS_FIRST_RUN_SEARCH_ENGINE_VIEW_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "chrome/browser/views/keyword_editor_view.h" 10 #include "chrome/browser/views/keyword_editor_view.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 // initial first run import. 78 // initial first run import.
79 class FirstRunSearchEngineView 79 class FirstRunSearchEngineView
80 : public views::View, 80 : public views::View,
81 public views::ButtonListener, 81 public views::ButtonListener,
82 public views::LinkController, 82 public views::LinkController,
83 public views::WindowDelegate, 83 public views::WindowDelegate,
84 public TemplateURLModelObserver { 84 public TemplateURLModelObserver {
85 public: 85 public:
86 // |observer| is the FirstRunView that waits for us to pass back a search 86 // |observer| is the FirstRunView that waits for us to pass back a search
87 // engine choice; |profile| allows us to get the set of imported search 87 // engine choice; |profile| allows us to get the set of imported search
88 // engines, and display the KeywordEditorView on demand. 88 // engines, and display the KeywordEditorView on demand; |randomize|
89 // is true if logos are to be displayed in random order.
89 FirstRunSearchEngineView(SearchEngineSelectionObserver* observer, 90 FirstRunSearchEngineView(SearchEngineSelectionObserver* observer,
90 Profile* profile); 91 Profile* profile, bool randomize);
91 92
92 virtual ~FirstRunSearchEngineView(); 93 virtual ~FirstRunSearchEngineView();
93 94
94 // Overridden from views::View: 95 // Overridden from views::View:
95 virtual gfx::Size GetPreferredSize(); 96 virtual gfx::Size GetPreferredSize();
96 virtual void Layout(); 97 virtual void Layout();
97 virtual void Paint(gfx::Canvas* canvas); 98 virtual void Paint(gfx::Canvas* canvas);
98 99
99 // Overridden from views::LinkActivated: 100 // Overridden from views::LinkActivated:
100 virtual void LinkActivated(views::Link* source, int event_flags); 101 virtual void LinkActivated(views::Link* source, int event_flags);
(...skipping 25 matching lines...) Expand all
126 std::vector<SearchEngineChoice*> search_engine_choices_; 127 std::vector<SearchEngineChoice*> search_engine_choices_;
127 128
128 // The profile associated with this import process. 129 // The profile associated with this import process.
129 Profile* profile_; 130 Profile* profile_;
130 131
131 // Gets called back when one of the choice buttons is pressed. 132 // Gets called back when one of the choice buttons is pressed.
132 SearchEngineSelectionObserver* observer_; 133 SearchEngineSelectionObserver* observer_;
133 134
134 bool text_direction_is_rtl_; 135 bool text_direction_is_rtl_;
135 136
137 // If logos are to be displayed in random order. Used for UX testing.
138 bool randomize_;
139
136 // UI elements: 140 // UI elements:
137 // Text above the first horizontal separator 141 // Text above the first horizontal separator
138 views::Label* title_label_; 142 views::Label* title_label_;
139 views::Label* text_label_; 143 views::Label* text_label_;
140 144
141 // Horizontal separators 145 // Horizontal separators
142 views::Separator* separator_1_; 146 views::Separator* separator_1_;
143 views::Separator* separator_2_; 147 views::Separator* separator_2_;
144 148
145 // Text below the second horizontal divider. The order of appearance of 149 // Text below the second horizontal divider. The order of appearance of
146 // these three elements is language-dependent. 150 // these three elements is language-dependent.
147 views::Label* subtext_label_1_; 151 views::Label* subtext_label_1_;
148 views::Label* subtext_label_2_; 152 views::Label* subtext_label_2_;
149 views::Link* options_link_; 153 views::Link* options_link_;
150 154
151 // Used to figure out positioning of embedded links in RTL languages 155 // Used to figure out positioning of embedded links in RTL languages
152 // (see view_text_utils::DrawTextAndPositionUrl). 156 // (see view_text_utils::DrawTextAndPositionUrl).
153 views::Label* dummy_subtext_label_; 157 views::Label* dummy_subtext_label_;
154 158
155 DISALLOW_COPY_AND_ASSIGN(FirstRunSearchEngineView); 159 DISALLOW_COPY_AND_ASSIGN(FirstRunSearchEngineView);
156 }; 160 };
157 161
158 #endif // CHROME_BROWSER_VIEWS_FIRST_RUN_SEARCH_ENGINE_VIEW_H_ 162 #endif // CHROME_BROWSER_VIEWS_FIRST_RUN_SEARCH_ENGINE_VIEW_H_
159 163
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698