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/image_loading_tracker.h" | 10 #include "chrome/browser/extensions/image_loading_tracker.h" |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 virtual void Observe(int type, | 145 virtual void Observe(int type, |
146 const content::NotificationSource& source, | 146 const content::NotificationSource& source, |
147 const content::NotificationDetails& details) OVERRIDE; | 147 const content::NotificationDetails& details) OVERRIDE; |
148 | 148 |
149 // MenuButton behavior overrides. These methods all default to TextButton | 149 // MenuButton behavior overrides. These methods all default to TextButton |
150 // behavior unless this button is a popup. In that case, it uses MenuButton | 150 // behavior unless this button is a popup. In that case, it uses MenuButton |
151 // behavior. MenuButton has the notion of a child popup being shown where the | 151 // behavior. MenuButton has the notion of a child popup being shown where the |
152 // button will stay in the pushed state until the "menu" (a popup in this | 152 // button will stay in the pushed state until the "menu" (a popup in this |
153 // case) is dismissed. | 153 // case) is dismissed. |
154 virtual bool Activate() OVERRIDE; | 154 virtual bool Activate() OVERRIDE; |
155 virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE; | 155 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; |
156 virtual void OnMouseReleased(const views::MouseEvent& event) OVERRIDE; | 156 virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE; |
157 virtual void OnMouseExited(const views::MouseEvent& event) OVERRIDE; | 157 virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE; |
158 virtual bool OnKeyReleased(const ui::KeyEvent& event) OVERRIDE; | 158 virtual bool OnKeyReleased(const ui::KeyEvent& event) OVERRIDE; |
159 | 159 |
160 // Overridden from ui::AcceleratorTarget. | 160 // Overridden from ui::AcceleratorTarget. |
161 virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE; | 161 virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE; |
162 | 162 |
163 // Notifications when to set button state to pushed/not pushed (for when the | 163 // Notifications when to set button state to pushed/not pushed (for when the |
164 // popup/context menu is hidden or shown by the container). | 164 // popup/context menu is hidden or shown by the container). |
165 void SetButtonPushed(); | 165 void SetButtonPushed(); |
166 void SetButtonNotPushed(); | 166 void SetButtonNotPushed(); |
167 | 167 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 | 218 |
219 // Responsible for running the menu. | 219 // Responsible for running the menu. |
220 scoped_ptr<views::MenuRunner> menu_runner_; | 220 scoped_ptr<views::MenuRunner> menu_runner_; |
221 | 221 |
222 friend class base::DeleteHelper<BrowserActionButton>; | 222 friend class base::DeleteHelper<BrowserActionButton>; |
223 | 223 |
224 DISALLOW_COPY_AND_ASSIGN(BrowserActionButton); | 224 DISALLOW_COPY_AND_ASSIGN(BrowserActionButton); |
225 }; | 225 }; |
226 | 226 |
227 #endif // CHROME_BROWSER_UI_VIEWS_BROWSER_ACTION_VIEW_H_ | 227 #endif // CHROME_BROWSER_UI_VIEWS_BROWSER_ACTION_VIEW_H_ |
OLD | NEW |