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

Side by Side Diff: chrome/browser/ui/views/infobars/infobar_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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_UI_VIEWS_INFOBARS_INFOBAR_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_INFOBARS_INFOBAR_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_INFOBARS_INFOBAR_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_INFOBARS_INFOBAR_VIEW_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 30 matching lines...) Expand all
41 const SkPath& fill_path() const { return fill_path_; } 41 const SkPath& fill_path() const { return fill_path_; }
42 const SkPath& stroke_path() const { return stroke_path_; } 42 const SkPath& stroke_path() const { return stroke_path_; }
43 43
44 protected: 44 protected:
45 static const int kButtonButtonSpacing; 45 static const int kButtonButtonSpacing;
46 static const int kEndOfLabelSpacing; 46 static const int kEndOfLabelSpacing;
47 47
48 virtual ~InfoBarView(); 48 virtual ~InfoBarView();
49 49
50 // Creates a label with the appropriate font and color for an infobar. 50 // Creates a label with the appropriate font and color for an infobar.
51 static views::Label* CreateLabel(const string16& text); 51 views::Label* CreateLabel(const string16& text) const;
52 52
53 // Creates a link with the appropriate font and color for an infobar. 53 // Creates a link with the appropriate font and color for an infobar.
54 // NOTE: Subclasses must ignore link clicks if we're unowned. 54 // NOTE: Subclasses must ignore link clicks if we're unowned.
55 static views::Link* CreateLink(const string16& text, 55 views::Link* CreateLink(const string16& text,
56 views::LinkListener* listener, 56 views::LinkListener* listener) const;
57 const SkColor& background_color);
58 57
59 // Creates a menu button with an infobar-specific appearance. 58 // Creates a menu button with an infobar-specific appearance.
60 // NOTE: Subclasses must ignore button presses if we're unowned. 59 // NOTE: Subclasses must ignore button presses if we're unowned.
61 static views::MenuButton* CreateMenuButton( 60 static views::MenuButton* CreateMenuButton(
62 const string16& text, 61 const string16& text,
63 views::ViewMenuDelegate* menu_delegate); 62 views::ViewMenuDelegate* menu_delegate);
64 63
65 // Creates a text button with an infobar-specific appearance. 64 // Creates a text button with an infobar-specific appearance.
66 // NOTE: Subclasses must ignore button presses if we're unowned. 65 // NOTE: Subclasses must ignore button presses if we're unowned.
67 static views::TextButton* CreateTextButton(views::ButtonListener* listener, 66 static views::TextButton* CreateTextButton(views::ButtonListener* listener,
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 SkPath fill_path_; 131 SkPath fill_path_;
133 SkPath stroke_path_; 132 SkPath stroke_path_;
134 133
135 // Used to run the menu. 134 // Used to run the menu.
136 scoped_ptr<views::MenuRunner> menu_runner_; 135 scoped_ptr<views::MenuRunner> menu_runner_;
137 136
138 DISALLOW_COPY_AND_ASSIGN(InfoBarView); 137 DISALLOW_COPY_AND_ASSIGN(InfoBarView);
139 }; 138 };
140 139
141 #endif // CHROME_BROWSER_UI_VIEWS_INFOBARS_INFOBAR_VIEW_H_ 140 #endif // CHROME_BROWSER_UI_VIEWS_INFOBARS_INFOBAR_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/infobars/infobar_background.cc ('k') | chrome/browser/ui/views/infobars/infobar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698