OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 | 6 |
| 7 #include "chrome/browser/ui/browser_show_actions.h" |
| 8 |
7 EVBubbleView::EVBubbleView(const int background_images[], | 9 EVBubbleView::EVBubbleView(const int background_images[], |
8 int contained_image, | 10 int contained_image, |
9 const SkColor& color, | 11 const SkColor& color, |
10 LocationBarView* location_bar) | 12 LocationBarView* location_bar, |
| 13 BrowserShowPageInfo* delegate) |
11 : IconLabelBubbleView(background_images, contained_image, color), | 14 : IconLabelBubbleView(background_images, contained_image, color), |
12 ALLOW_THIS_IN_INITIALIZER_LIST(click_handler_(this, location_bar)) { | 15 ALLOW_THIS_IN_INITIALIZER_LIST( |
| 16 click_handler_(this, location_bar, delegate)) { |
13 SetElideInMiddle(true); | 17 SetElideInMiddle(true); |
14 } | 18 } |
15 | 19 |
16 EVBubbleView::~EVBubbleView() { | 20 EVBubbleView::~EVBubbleView() { |
17 } | 21 } |
18 | 22 |
19 bool EVBubbleView::OnMousePressed(const views::MouseEvent& event) { | 23 bool EVBubbleView::OnMousePressed(const views::MouseEvent& event) { |
20 // We want to show the dialog on mouse release; that is the standard behavior | 24 // We want to show the dialog on mouse release; that is the standard behavior |
21 // for buttons. | 25 // for buttons. |
22 return true; | 26 return true; |
23 } | 27 } |
24 | 28 |
25 void EVBubbleView::OnMouseReleased(const views::MouseEvent& event) { | 29 void EVBubbleView::OnMouseReleased(const views::MouseEvent& event) { |
26 click_handler_.OnMouseReleased(event); | 30 click_handler_.OnMouseReleased(event); |
27 } | 31 } |
OLD | NEW |