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

Side by Side Diff: chrome/browser/ui/views/location_bar/icon_label_bubble_view.h

Issue 25039002: Always aligns text at vertically center (Textfield, Label). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Synced. Created 7 years, 1 month 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_LOCATION_BAR_ICON_LABEL_BUBBLE_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ICON_LABEL_BUBBLE_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ICON_LABEL_BUBBLE_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ICON_LABEL_BUBBLE_VIEW_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
(...skipping 10 matching lines...) Expand all
21 class ImageView; 21 class ImageView;
22 class Label; 22 class Label;
23 class Painter; 23 class Painter;
24 } 24 }
25 25
26 // View used to draw a bubble to the left of the address, containing an icon and 26 // View used to draw a bubble to the left of the address, containing an icon and
27 // a label. We use this as a base for the classes that handle the EV bubble and 27 // a label. We use this as a base for the classes that handle the EV bubble and
28 // tab-to-search UI. 28 // tab-to-search UI.
29 class IconLabelBubbleView : public views::View { 29 class IconLabelBubbleView : public views::View {
30 public: 30 public:
31 // The label will be positioned |font_y_offset| px. from the top of the view.
32 // |hover_background_images| is an optional set of images to be used in place 31 // |hover_background_images| is an optional set of images to be used in place
33 // of |background_images| during mouse hover. 32 // of |background_images| during mouse hover.
34 IconLabelBubbleView(const int background_images[], 33 IconLabelBubbleView(const int background_images[],
35 const int hover_background_images[], 34 const int hover_background_images[],
36 int contained_image, 35 int contained_image,
37 const gfx::FontList& font_list, 36 const gfx::FontList& font_list,
38 int font_y_offset,
39 SkColor text_color, 37 SkColor text_color,
40 SkColor parent_background_color, 38 SkColor parent_background_color,
41 bool elide_in_middle); 39 bool elide_in_middle);
42 virtual ~IconLabelBubbleView(); 40 virtual ~IconLabelBubbleView();
43 41
44 void SetLabel(const string16& label); 42 void SetLabel(const string16& label);
45 void SetImage(const gfx::ImageSkia& image); 43 void SetImage(const gfx::ImageSkia& image);
46 void set_is_extension_icon(bool is_extension_icon) { 44 void set_is_extension_icon(bool is_extension_icon) {
47 is_extension_icon_ = is_extension_icon; 45 is_extension_icon_ = is_extension_icon;
48 } 46 }
(...skipping 28 matching lines...) Expand all
77 views::ImageView* image_; 75 views::ImageView* image_;
78 views::Label* label_; 76 views::Label* label_;
79 77
80 bool is_extension_icon_; 78 bool is_extension_icon_;
81 bool in_hover_; 79 bool in_hover_;
82 80
83 DISALLOW_COPY_AND_ASSIGN(IconLabelBubbleView); 81 DISALLOW_COPY_AND_ASSIGN(IconLabelBubbleView);
84 }; 82 };
85 83
86 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ICON_LABEL_BUBBLE_VIEW_H_ 84 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ICON_LABEL_BUBBLE_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/location_bar/ev_bubble_view.cc ('k') | chrome/browser/ui/views/location_bar/icon_label_bubble_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698