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_PAGE_ACTION_IMAGE_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_PAGE_ACTION_IMAGE_VIEW_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_PAGE_ACTION_IMAGE_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_PAGE_ACTION_IMAGE_VIEW_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
(...skipping 25 matching lines...) Expand all Loading... |
36 | 36 |
37 int current_tab_id() { return current_tab_id_; } | 37 int current_tab_id() { return current_tab_id_; } |
38 | 38 |
39 void set_preview_enabled(bool preview_enabled) { | 39 void set_preview_enabled(bool preview_enabled) { |
40 preview_enabled_ = preview_enabled; | 40 preview_enabled_ = preview_enabled; |
41 } | 41 } |
42 | 42 |
43 // Overridden from view. | 43 // Overridden from view. |
44 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; | 44 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; |
45 virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE; | 45 virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE; |
46 virtual void OnMouseReleased(const views::MouseEvent& event, bool canceled) | 46 virtual void OnMouseReleased(const views::MouseEvent& event) OVERRIDE; |
47 OVERRIDE; | 47 virtual bool OnKeyPressed(const views::KeyEvent& event) OVERRIDE; |
48 virtual bool OnKeyPressed(const views::KeyEvent& e) OVERRIDE; | 48 virtual void ShowContextMenu(const gfx::Point& p, |
49 virtual void ShowContextMenu(const gfx::Point& p, bool is_mouse_gesture) | 49 bool is_mouse_gesture) OVERRIDE; |
50 OVERRIDE; | |
51 | 50 |
52 // Overridden from ImageLoadingTracker. | 51 // Overridden from ImageLoadingTracker. |
53 virtual void OnImageLoaded( | 52 virtual void OnImageLoaded(SkBitmap* image, |
54 SkBitmap* image, const ExtensionResource& resource, int index); | 53 const ExtensionResource& resource, |
| 54 int index) OVERRIDE; |
55 | 55 |
56 // Overridden from ExtensionContextMenuModelModel::Delegate | 56 // Overridden from ExtensionContextMenuModelModel::Delegate |
57 virtual void InspectPopup(ExtensionAction* action) OVERRIDE; | 57 virtual void InspectPopup(ExtensionAction* action) OVERRIDE; |
58 | 58 |
59 // Overridden from ExtensionPopup::Observer | 59 // Overridden from ExtensionPopup::Observer |
60 virtual void ExtensionPopupIsClosing(ExtensionPopup* popup) OVERRIDE; | 60 virtual void ExtensionPopupIsClosing(ExtensionPopup* popup) OVERRIDE; |
61 | 61 |
62 // Called to notify the PageAction that it should determine whether to be | 62 // Called to notify the PageAction that it should determine whether to be |
63 // visible or hidden. |contents| is the TabContents that is active, |url| is | 63 // visible or hidden. |contents| is the TabContents that is active, |url| is |
64 // the current page URL. | 64 // the current page URL. |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 // briefly shown even if it hasn't been enabled by its extension. | 106 // briefly shown even if it hasn't been enabled by its extension. |
107 bool preview_enabled_; | 107 bool preview_enabled_; |
108 | 108 |
109 // The current popup and the button it came from. NULL if no popup. | 109 // The current popup and the button it came from. NULL if no popup. |
110 ExtensionPopup* popup_; | 110 ExtensionPopup* popup_; |
111 | 111 |
112 DISALLOW_IMPLICIT_CONSTRUCTORS(PageActionImageView); | 112 DISALLOW_IMPLICIT_CONSTRUCTORS(PageActionImageView); |
113 }; | 113 }; |
114 | 114 |
115 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_PAGE_ACTION_IMAGE_VIEW_H_ | 115 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_PAGE_ACTION_IMAGE_VIEW_H_ |
OLD | NEW |