| 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[] = { |
| 12 IDR_OMNIBOX_EV_BUBBLE_LEFT, |
| 13 IDR_OMNIBOX_EV_BUBBLE_CENTER, |
| 14 IDR_OMNIBOX_EV_BUBBLE_RIGHT, |
| 15 }; |
| 12 } | 16 } |
| 13 | 17 |
| 14 | 18 |
| 15 EVBubbleView::EVBubbleView(const gfx::Font& font, | 19 EVBubbleView::EVBubbleView(const gfx::Font& font, |
| 16 int font_y_offset, | 20 int font_y_offset, |
| 17 SkColor text_color, | 21 SkColor text_color, |
| 18 SkColor parent_background_color, | 22 SkColor parent_background_color, |
| 19 LocationBarView* location_bar) | 23 LocationBarView* location_bar) |
| 20 : IconLabelBubbleView(kBackgroundImages, IDR_OMNIBOX_HTTPS_VALID, font, | 24 : IconLabelBubbleView(kBackgroundImages, IDR_OMNIBOX_HTTPS_VALID, font, |
| 21 font_y_offset, text_color, parent_background_color, | 25 font_y_offset, text_color, parent_background_color, |
| (...skipping 21 matching lines...) Expand all Loading... |
| 43 void EVBubbleView::OnMouseReleased(const ui::MouseEvent& event) { | 47 void EVBubbleView::OnMouseReleased(const ui::MouseEvent& event) { |
| 44 page_info_helper_.ProcessEvent(event); | 48 page_info_helper_.ProcessEvent(event); |
| 45 } | 49 } |
| 46 | 50 |
| 47 void EVBubbleView::OnGestureEvent(ui::GestureEvent* event) { | 51 void EVBubbleView::OnGestureEvent(ui::GestureEvent* event) { |
| 48 if (event->type() == ui::ET_GESTURE_TAP) { | 52 if (event->type() == ui::ET_GESTURE_TAP) { |
| 49 page_info_helper_.ProcessEvent(*event); | 53 page_info_helper_.ProcessEvent(*event); |
| 50 event->SetHandled(); | 54 event->SetHandled(); |
| 51 } | 55 } |
| 52 } | 56 } |
| OLD | NEW |