| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_BUBBLE_ICON_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_BUBBLE_ICON_VIEW_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_BUBBLE_ICON_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_BUBBLE_ICON_VIEW_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 // Sets the tooltip text. | 50 // Sets the tooltip text. |
| 51 void SetTooltipText(const base::string16& tooltip); | 51 void SetTooltipText(const base::string16& tooltip); |
| 52 | 52 |
| 53 // Invoked prior to executing the command. | 53 // Invoked prior to executing the command. |
| 54 virtual void OnExecuting(ExecuteSource execute_source) = 0; | 54 virtual void OnExecuting(ExecuteSource execute_source) = 0; |
| 55 | 55 |
| 56 // Invoked after the icon is pressed. | 56 // Invoked after the icon is pressed. |
| 57 virtual void OnPressed(bool activated) {} | 57 virtual void OnPressed(bool activated) {} |
| 58 | 58 |
| 59 // views::View: | 59 // views::View: |
| 60 void GetAccessibleState(ui::AXViewState* state) override; | 60 void GetAccessibleNodeData(ui::AXNodeData* node_data) override; |
| 61 bool GetTooltipText(const gfx::Point& p, | 61 bool GetTooltipText(const gfx::Point& p, |
| 62 base::string16* tooltip) const override; | 62 base::string16* tooltip) const override; |
| 63 gfx::Size GetPreferredSize() const override; | 63 gfx::Size GetPreferredSize() const override; |
| 64 void Layout() override; | 64 void Layout() override; |
| 65 bool OnMousePressed(const ui::MouseEvent& event) override; | 65 bool OnMousePressed(const ui::MouseEvent& event) override; |
| 66 void OnMouseReleased(const ui::MouseEvent& event) override; | 66 void OnMouseReleased(const ui::MouseEvent& event) override; |
| 67 bool OnKeyPressed(const ui::KeyEvent& event) override; | 67 bool OnKeyPressed(const ui::KeyEvent& event) override; |
| 68 bool OnKeyReleased(const ui::KeyEvent& event) override; | 68 bool OnKeyReleased(const ui::KeyEvent& event) override; |
| 69 void ViewHierarchyChanged( | 69 void ViewHierarchyChanged( |
| 70 const ViewHierarchyChangedDetails& details) override; | 70 const ViewHierarchyChangedDetails& details) override; |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 private: | 106 private: |
| 107 // The image shown in the button. | 107 // The image shown in the button. |
| 108 views::ImageView* image_; | 108 views::ImageView* image_; |
| 109 | 109 |
| 110 // The CommandUpdater for the Browser object that owns the location bar. | 110 // The CommandUpdater for the Browser object that owns the location bar. |
| 111 CommandUpdater* command_updater_; | 111 CommandUpdater* command_updater_; |
| 112 | 112 |
| 113 // The command ID executed when the user clicks this icon. | 113 // The command ID executed when the user clicks this icon. |
| 114 const int command_id_; | 114 const int command_id_; |
| 115 | 115 |
| 116 // The active state. The precise definition of "active" is unique to each | 116 // The active node_data. The precise definition of "active" is unique to each |
| 117 // subclass, but generally indicates that the associated feature is acting on | 117 // subclass, but generally indicates that the associated feature is acting on |
| 118 // the web page. | 118 // the web page. |
| 119 bool active_; | 119 bool active_; |
| 120 | 120 |
| 121 // This is used to check if the bookmark bubble was showing during the mouse | 121 // This is used to check if the bookmark bubble was showing during the mouse |
| 122 // pressed event. If this is true then the mouse released event is ignored to | 122 // pressed event. If this is true then the mouse released event is ignored to |
| 123 // prevent the bubble from reshowing. | 123 // prevent the bubble from reshowing. |
| 124 bool suppress_mouse_released_action_; | 124 bool suppress_mouse_released_action_; |
| 125 | 125 |
| 126 DISALLOW_COPY_AND_ASSIGN(BubbleIconView); | 126 DISALLOW_COPY_AND_ASSIGN(BubbleIconView); |
| 127 }; | 127 }; |
| 128 | 128 |
| 129 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_BUBBLE_ICON_VIEW_H_ | 129 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_BUBBLE_ICON_VIEW_H_ |
| OLD | NEW |