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

Unified Diff: chrome/browser/ui/views/first_run_search_engine_view.h

Issue 8221027: Make views::Label and views::Link auto-color themselves to be readable over their background colo... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/first_run_search_engine_view.h
===================================================================
--- chrome/browser/ui/views/first_run_search_engine_view.h (revision 104959)
+++ chrome/browser/ui/views/first_run_search_engine_view.h (working copy)
@@ -17,6 +17,7 @@
class Profile;
class TemplateURL;
class TemplateURLService;
+class ThemeService;
namespace views {
class ImageView;
@@ -94,6 +95,9 @@
// Overridden from views::View:
virtual gfx::Size GetPreferredSize() OVERRIDE;
virtual void Layout() OVERRIDE;
+ virtual void ViewHierarchyChanged(bool is_add,
+ View* parent,
+ View* child) OVERRIDE;
virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE;
// Override from views::View so we can draw the gray background at dialog top.
@@ -105,23 +109,25 @@
virtual void OnTemplateURLServiceChanged() OVERRIDE;
private:
- // Initializes the labels and controls in the view.
- void SetupControls();
+ // Once the TemplateURLService has loaded and we're in a View hierarchy, it's
+ // OK to add the search engines from the TemplateURLService.
+ void AddSearchEnginesIfPossible();
- // Owned by the profile_.
- TemplateURLService* search_engines_model_;
-
// One for each search engine choice offered, either three or four.
std::vector<SearchEngineChoice*> search_engine_choices_;
// If logos are to be displayed in random order. Used for UX testing.
bool randomize_;
- // The profile associated with this import process.
- Profile* profile_;
+ // Services associated with the current profile.
+ TemplateURLService* template_url_service_;
+ ThemeService* theme_service_;
bool text_direction_is_rtl_;
+ bool template_url_service_loaded_;
+ bool added_to_view_hierarchy_;
+
// Image of browser search box with grey background and bubble arrow.
views::ImageView* background_image_;
« no previous file with comments | « chrome/browser/ui/views/first_run_bubble.cc ('k') | chrome/browser/ui/views/first_run_search_engine_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698