| 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 | 9 |
| 10 namespace { | 10 namespace { |
| 11 const int kBackgroundImages[] = IMAGE_GRID(IDR_OMNIBOX_EV_BUBBLE); | 11 const int kBackgroundImages[] = IMAGE_GRID(IDR_OMNIBOX_EV_BUBBLE); |
| 12 } | 12 } |
| 13 | 13 |
| 14 | 14 |
| 15 EVBubbleView::EVBubbleView(const gfx::Font& font, | 15 EVBubbleView::EVBubbleView(const gfx::FontList& font_list, |
| 16 int font_y_offset, | 16 int font_y_offset, |
| 17 SkColor text_color, | 17 SkColor text_color, |
| 18 SkColor parent_background_color, | 18 SkColor parent_background_color, |
| 19 LocationBarView* location_bar) | 19 LocationBarView* location_bar) |
| 20 : IconLabelBubbleView(kBackgroundImages, NULL, IDR_OMNIBOX_HTTPS_VALID, | 20 : IconLabelBubbleView(kBackgroundImages, NULL, IDR_OMNIBOX_HTTPS_VALID, |
| 21 font, font_y_offset, text_color, | 21 font_list, font_y_offset, text_color, |
| 22 parent_background_color, true), | 22 parent_background_color, true), |
| 23 page_info_helper_(this, location_bar) { | 23 page_info_helper_(this, location_bar) { |
| 24 } | 24 } |
| 25 | 25 |
| 26 EVBubbleView::~EVBubbleView() { | 26 EVBubbleView::~EVBubbleView() { |
| 27 } | 27 } |
| 28 | 28 |
| 29 gfx::Size EVBubbleView::GetMinimumSize() { | 29 gfx::Size EVBubbleView::GetMinimumSize() { |
| 30 // Height will be ignored by the LocationBarView. | 30 // Height will be ignored by the LocationBarView. |
| 31 gfx::Size minimum(GetPreferredSize()); | 31 gfx::Size minimum(GetPreferredSize()); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 43 void EVBubbleView::OnMouseReleased(const ui::MouseEvent& event) { | 43 void EVBubbleView::OnMouseReleased(const ui::MouseEvent& event) { |
| 44 page_info_helper_.ProcessEvent(event); | 44 page_info_helper_.ProcessEvent(event); |
| 45 } | 45 } |
| 46 | 46 |
| 47 void EVBubbleView::OnGestureEvent(ui::GestureEvent* event) { | 47 void EVBubbleView::OnGestureEvent(ui::GestureEvent* event) { |
| 48 if (event->type() == ui::ET_GESTURE_TAP) { | 48 if (event->type() == ui::ET_GESTURE_TAP) { |
| 49 page_info_helper_.ProcessEvent(*event); | 49 page_info_helper_.ProcessEvent(*event); |
| 50 event->SetHandled(); | 50 event->SetHandled(); |
| 51 } | 51 } |
| 52 } | 52 } |
| OLD | NEW |