OLD | NEW |
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_LOCATION_ICON_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_ICON_VIEW_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_ICON_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_ICON_VIEW_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "chrome/browser/ui/views/location_bar/icon_label_bubble_view.h" | 9 #include "chrome/browser/ui/views/location_bar/icon_label_bubble_view.h" |
10 | 10 |
(...skipping 17 matching lines...) Expand all Loading... |
28 // IconLabelBubbleView: | 28 // IconLabelBubbleView: |
29 gfx::Size GetMinimumSize() const override; | 29 gfx::Size GetMinimumSize() const override; |
30 bool OnMousePressed(const ui::MouseEvent& event) override; | 30 bool OnMousePressed(const ui::MouseEvent& event) override; |
31 bool OnMouseDragged(const ui::MouseEvent& event) override; | 31 bool OnMouseDragged(const ui::MouseEvent& event) override; |
32 void OnMouseReleased(const ui::MouseEvent& event) override; | 32 void OnMouseReleased(const ui::MouseEvent& event) override; |
33 void OnGestureEvent(ui::GestureEvent* event) override; | 33 void OnGestureEvent(ui::GestureEvent* event) override; |
34 bool GetTooltipText(const gfx::Point& p, | 34 bool GetTooltipText(const gfx::Point& p, |
35 base::string16* tooltip) const override; | 35 base::string16* tooltip) const override; |
36 SkColor GetTextColor() const override; | 36 SkColor GetTextColor() const override; |
37 SkColor GetBorderColor() const override; | 37 SkColor GetBorderColor() const override; |
38 bool OnActivate() override; | 38 bool OnActivate(const ui::Event& event) override; |
39 | 39 |
40 // Whether we should show the tooltip for this icon or not. | 40 // Whether we should show the tooltip for this icon or not. |
41 void set_show_tooltip(bool show_tooltip) { show_tooltip_ = show_tooltip; } | 41 void set_show_tooltip(bool show_tooltip) { show_tooltip_ = show_tooltip; } |
42 | 42 |
43 // Returns what the minimum size would be if the label text were |text|. | 43 // Returns what the minimum size would be if the label text were |text|. |
44 gfx::Size GetMinimumSizeForLabelText(const base::string16& text) const; | 44 gfx::Size GetMinimumSizeForLabelText(const base::string16& text) const; |
45 | 45 |
46 const gfx::FontList& GetFontList() const { return font_list(); } | 46 const gfx::FontList& GetFontList() const { return font_list(); } |
47 | 47 |
48 // Set the background image. Pass false for |should_show_ev| for all non-EV | 48 // Set the background image. Pass false for |should_show_ev| for all non-EV |
(...skipping 17 matching lines...) Expand all Loading... |
66 | 66 |
67 // True if hovering this view should display a tooltip. | 67 // True if hovering this view should display a tooltip. |
68 bool show_tooltip_; | 68 bool show_tooltip_; |
69 | 69 |
70 LocationBarView* location_bar_; | 70 LocationBarView* location_bar_; |
71 | 71 |
72 DISALLOW_COPY_AND_ASSIGN(LocationIconView); | 72 DISALLOW_COPY_AND_ASSIGN(LocationIconView); |
73 }; | 73 }; |
74 | 74 |
75 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_ICON_VIEW_H_ | 75 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_ICON_VIEW_H_ |
OLD | NEW |