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 #ifndef CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_ICON_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_ICON_VIEW_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_ICON_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_ICON_VIEW_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "chrome/browser/ui/views/location_bar/click_handler.h" | 9 #include "chrome/browser/ui/views/location_bar/click_handler.h" |
10 #include "ui/views/controls/image_view.h" | 10 #include "ui/views/controls/image_view.h" |
11 | 11 |
12 class LocationBarView; | 12 class LocationBarView; |
13 namespace views { | 13 namespace views { |
14 class MouseEvent; | 14 class MouseEvent; |
15 } | 15 } |
16 | 16 |
17 // LocationIconView is used to display an icon to the left of the edit field. | 17 // LocationIconView is used to display an icon to the left of the edit field. |
18 // This shows the user's current action while editing, the page security | 18 // This shows the user's current action while editing, the page security |
19 // status on https pages, or a globe for other URLs. | 19 // status on https pages, or a globe for other URLs. |
20 class LocationIconView : public views::ImageView { | 20 class LocationIconView : public views::ImageView { |
21 public: | 21 public: |
22 explicit LocationIconView(LocationBarView* location_bar); | 22 explicit LocationIconView(LocationBarView* location_bar, |
| 23 BrowserShowPageInfo* delegate); |
23 virtual ~LocationIconView(); | 24 virtual ~LocationIconView(); |
24 | 25 |
25 // Overridden from views::ImageView: | 26 // Overridden from views::ImageView: |
26 virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE; | 27 virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE; |
27 virtual void OnMouseReleased(const views::MouseEvent& event) OVERRIDE; | 28 virtual void OnMouseReleased(const views::MouseEvent& event) OVERRIDE; |
28 | 29 |
29 // Whether we should show the tooltip for this icon or not. | 30 // Whether we should show the tooltip for this icon or not. |
30 void ShowTooltip(bool show); | 31 void ShowTooltip(bool show); |
31 | 32 |
32 private: | 33 private: |
33 ClickHandler click_handler_; | 34 ClickHandler click_handler_; |
34 | 35 |
35 DISALLOW_IMPLICIT_CONSTRUCTORS(LocationIconView); | 36 DISALLOW_IMPLICIT_CONSTRUCTORS(LocationIconView); |
36 }; | 37 }; |
37 | 38 |
38 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_ICON_VIEW_H_ | 39 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_ICON_VIEW_H_ |
OLD | NEW |