| 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 #ifndef CHROME_BROWSER_UI_VIEWS_BROWSER_ACTION_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_BROWSER_ACTION_VIEW_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_BROWSER_ACTION_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_BROWSER_ACTION_VIEW_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "chrome/browser/extensions/extension_action_icon_factory.h" | 10 #include "chrome/browser/extensions/extension_action_icon_factory.h" |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 // MenuButton behavior overrides. These methods all default to TextButton | 151 // MenuButton behavior overrides. These methods all default to TextButton |
| 152 // behavior unless this button is a popup. In that case, it uses MenuButton | 152 // behavior unless this button is a popup. In that case, it uses MenuButton |
| 153 // behavior. MenuButton has the notion of a child popup being shown where the | 153 // behavior. MenuButton has the notion of a child popup being shown where the |
| 154 // button will stay in the pushed state until the "menu" (a popup in this | 154 // button will stay in the pushed state until the "menu" (a popup in this |
| 155 // case) is dismissed. | 155 // case) is dismissed. |
| 156 virtual bool Activate() OVERRIDE; | 156 virtual bool Activate() OVERRIDE; |
| 157 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; | 157 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; |
| 158 virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE; | 158 virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE; |
| 159 virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE; | 159 virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE; |
| 160 virtual bool OnKeyReleased(const ui::KeyEvent& event) OVERRIDE; | 160 virtual bool OnKeyReleased(const ui::KeyEvent& event) OVERRIDE; |
| 161 virtual ui::EventResult OnGestureEvent(ui::GestureEvent* event) OVERRIDE; |
| 161 | 162 |
| 162 // Overridden from ui::AcceleratorTarget. | 163 // Overridden from ui::AcceleratorTarget. |
| 163 virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE; | 164 virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE; |
| 164 | 165 |
| 165 // Notifications when to set button state to pushed/not pushed (for when the | 166 // Notifications when to set button state to pushed/not pushed (for when the |
| 166 // popup/context menu is hidden or shown by the container). | 167 // popup/context menu is hidden or shown by the container). |
| 167 void SetButtonPushed(); | 168 void SetButtonPushed(); |
| 168 void SetButtonNotPushed(); | 169 void SetButtonNotPushed(); |
| 169 | 170 |
| 170 // Whether the browser action is enabled on this tab. Note that we cannot use | 171 // Whether the browser action is enabled on this tab. Note that we cannot use |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 | 229 |
| 229 // Responsible for running the menu. | 230 // Responsible for running the menu. |
| 230 scoped_ptr<views::MenuRunner> menu_runner_; | 231 scoped_ptr<views::MenuRunner> menu_runner_; |
| 231 | 232 |
| 232 friend class base::DeleteHelper<BrowserActionButton>; | 233 friend class base::DeleteHelper<BrowserActionButton>; |
| 233 | 234 |
| 234 DISALLOW_COPY_AND_ASSIGN(BrowserActionButton); | 235 DISALLOW_COPY_AND_ASSIGN(BrowserActionButton); |
| 235 }; | 236 }; |
| 236 | 237 |
| 237 #endif // CHROME_BROWSER_UI_VIEWS_BROWSER_ACTION_VIEW_H_ | 238 #endif // CHROME_BROWSER_UI_VIEWS_BROWSER_ACTION_VIEW_H_ |
| OLD | NEW |