| 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_EV_BUBBLE_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_EV_BUBBLE_VIEW_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_EV_BUBBLE_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_EV_BUBBLE_VIEW_H_ |
| 7 | 7 |
| 8 #include "chrome/browser/ui/views/location_bar/icon_label_bubble_view.h" | 8 #include "chrome/browser/ui/views/location_bar/icon_label_bubble_view.h" |
| 9 #include "chrome/browser/ui/views/location_bar/page_info_helper.h" | 9 #include "chrome/browser/ui/views/location_bar/page_info_helper.h" |
| 10 | 10 |
| 11 class LocationBarView; | 11 class LocationBarView; |
| 12 | 12 |
| 13 // EVBubbleView displays the EV Bubble in the LocationBarView. | 13 // EVBubbleView displays the EV Bubble in the LocationBarView. |
| 14 class EVBubbleView : public IconLabelBubbleView { | 14 class EVBubbleView : public IconLabelBubbleView { |
| 15 public: | 15 public: |
| 16 EVBubbleView(const gfx::FontList& font_list, | 16 EVBubbleView(const gfx::FontList& font_list, |
| 17 SkColor text_color, | 17 SkColor text_color, |
| 18 SkColor parent_background_color, | 18 SkColor parent_background_color, |
| 19 LocationBarView* parent); | 19 LocationBarView* parent); |
| 20 ~EVBubbleView() override; | 20 ~EVBubbleView() override; |
| 21 | 21 |
| 22 // IconLabelBubbleView: | 22 // IconLabelBubbleView: |
| 23 SkColor GetTextColor() const override; |
| 24 SkColor GetBorderColor() const override; |
| 25 |
| 26 // views::View: |
| 23 gfx::Size GetMinimumSize() const override; | 27 gfx::Size GetMinimumSize() const override; |
| 24 bool OnMousePressed(const ui::MouseEvent& event) override; | 28 bool OnMousePressed(const ui::MouseEvent& event) override; |
| 25 void OnMouseReleased(const ui::MouseEvent& event) override; | 29 void OnMouseReleased(const ui::MouseEvent& event) override; |
| 26 void OnGestureEvent(ui::GestureEvent* event) override; | 30 void OnGestureEvent(ui::GestureEvent* event) override; |
| 27 | 31 |
| 28 // Returns what the minimum size would be if the label text were |text|. | 32 // Returns what the minimum size would be if the label text were |text|. |
| 29 gfx::Size GetMinimumSizeForLabelText(const base::string16& text) const; | 33 gfx::Size GetMinimumSizeForLabelText(const base::string16& text) const; |
| 30 | 34 |
| 31 private: | 35 private: |
| 32 // Returns what the minimum size would be if the preferred size were |size|. | 36 // Returns what the minimum size would be if the preferred size were |size|. |
| 33 gfx::Size GetMinimumSizeForPreferredSize(gfx::Size size) const; | 37 gfx::Size GetMinimumSizeForPreferredSize(gfx::Size size) const; |
| 34 | 38 |
| 39 // TODO(estade): this should be gleaned from the theme instead of hardcoded in |
| 40 // location_bar_view.cc and cached here. |
| 41 SkColor text_color_; |
| 42 |
| 35 PageInfoHelper page_info_helper_; | 43 PageInfoHelper page_info_helper_; |
| 36 | 44 |
| 37 DISALLOW_COPY_AND_ASSIGN(EVBubbleView); | 45 DISALLOW_COPY_AND_ASSIGN(EVBubbleView); |
| 38 }; | 46 }; |
| 39 | 47 |
| 40 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_EV_BUBBLE_VIEW_H_ | 48 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_EV_BUBBLE_VIEW_H_ |
| OLD | NEW |