[Metrics] Make MetricsStateManager take a callback param to check if UMA is enabled.
[chromium-blink-merge.git] / chrome / browser / ui / views / location_bar / ev_bubble_view.h
blob7fded1f1361809a22f1f493fb2b2fd76f665b0af
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_EV_BUBBLE_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_EV_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"
11 class LocationBarView;
13 // EVBubbleView displays the EV Bubble in the LocationBarView.
14 class EVBubbleView : public IconLabelBubbleView {
15 public:
16 EVBubbleView(const gfx::FontList& font_list,
17 SkColor text_color,
18 SkColor parent_background_color,
19 LocationBarView* parent);
20 virtual ~EVBubbleView();
22 // IconLabelBubbleView:
23 virtual gfx::Size GetMinimumSize() const OVERRIDE;
24 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE;
25 virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE;
26 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
28 // Returns what the minimum size would be if the label text were |text|.
29 gfx::Size GetMinimumSizeForLabelText(const base::string16& text) const;
31 private:
32 // Returns what the minimum size would be if the preferred size were |size|.
33 gfx::Size GetMinimumSizeForPreferredSize(gfx::Size size) const;
35 PageInfoHelper page_info_helper_;
37 DISALLOW_COPY_AND_ASSIGN(EVBubbleView);
40 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_EV_BUBBLE_VIEW_H_