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 #include "chrome/browser/ui/views/location_bar/ev_bubble_view.h" | 5 #include "chrome/browser/ui/views/location_bar/ev_bubble_view.h" |
6 #include "grit/theme_resources.h" | 6 #include "grit/theme_resources.h" |
7 #include "ui/views/painter.h" | 7 #include "ui/views/painter.h" |
8 | 8 |
9 | |
Peter Kasting
2013/10/21 23:29:22
Nit: Leave this and the other blank line below tha
Yuki
2013/10/22 06:13:35
Done.
| |
10 namespace { | 9 namespace { |
11 const int kBackgroundImages[] = IMAGE_GRID(IDR_OMNIBOX_EV_BUBBLE); | 10 const int kBackgroundImages[] = IMAGE_GRID(IDR_OMNIBOX_EV_BUBBLE); |
12 } | 11 } |
13 | 12 |
14 | |
15 EVBubbleView::EVBubbleView(const gfx::FontList& font_list, | 13 EVBubbleView::EVBubbleView(const gfx::FontList& font_list, |
16 int font_y_offset, | |
17 SkColor text_color, | 14 SkColor text_color, |
18 SkColor parent_background_color, | 15 SkColor parent_background_color, |
19 LocationBarView* location_bar) | 16 LocationBarView* location_bar) |
20 : IconLabelBubbleView(kBackgroundImages, NULL, IDR_OMNIBOX_HTTPS_VALID, | 17 : IconLabelBubbleView(kBackgroundImages, NULL, IDR_OMNIBOX_HTTPS_VALID, |
21 font_list, font_y_offset, text_color, | 18 font_list, text_color, parent_background_color, true), |
22 parent_background_color, true), | |
23 page_info_helper_(this, location_bar) { | 19 page_info_helper_(this, location_bar) { |
24 } | 20 } |
25 | 21 |
26 EVBubbleView::~EVBubbleView() { | 22 EVBubbleView::~EVBubbleView() { |
27 } | 23 } |
28 | 24 |
29 gfx::Size EVBubbleView::GetMinimumSize() { | 25 gfx::Size EVBubbleView::GetMinimumSize() { |
30 // Height will be ignored by the LocationBarView. | 26 // Height will be ignored by the LocationBarView. |
31 gfx::Size minimum(GetPreferredSize()); | 27 gfx::Size minimum(GetPreferredSize()); |
32 static const int kMinBubbleWidth = 150; | 28 static const int kMinBubbleWidth = 150; |
(...skipping 10 matching lines...) Expand all Loading... | |
43 void EVBubbleView::OnMouseReleased(const ui::MouseEvent& event) { | 39 void EVBubbleView::OnMouseReleased(const ui::MouseEvent& event) { |
44 page_info_helper_.ProcessEvent(event); | 40 page_info_helper_.ProcessEvent(event); |
45 } | 41 } |
46 | 42 |
47 void EVBubbleView::OnGestureEvent(ui::GestureEvent* event) { | 43 void EVBubbleView::OnGestureEvent(ui::GestureEvent* event) { |
48 if (event->type() == ui::ET_GESTURE_TAP) { | 44 if (event->type() == ui::ET_GESTURE_TAP) { |
49 page_info_helper_.ProcessEvent(*event); | 45 page_info_helper_.ProcessEvent(*event); |
50 event->SetHandled(); | 46 event->SetHandled(); |
51 } | 47 } |
52 } | 48 } |
OLD | NEW |