| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 VIEWS_CONTROLS_BUTTON_MENU_BUTTON_H_ | 5 #ifndef VIEWS_CONTROLS_BUTTON_MENU_BUTTON_H_ |
| 6 #define VIEWS_CONTROLS_BUTTON_MENU_BUTTON_H_ | 6 #define VIEWS_CONTROLS_BUTTON_MENU_BUTTON_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 | 51 |
| 52 // These methods are overriden to implement a simple push button | 52 // These methods are overriden to implement a simple push button |
| 53 // behavior. | 53 // behavior. |
| 54 virtual bool OnMousePressed(const MouseEvent& e); | 54 virtual bool OnMousePressed(const MouseEvent& e); |
| 55 virtual void OnMouseReleased(const MouseEvent& e, bool canceled); | 55 virtual void OnMouseReleased(const MouseEvent& e, bool canceled); |
| 56 virtual void OnMouseExited(const MouseEvent& event); | 56 virtual void OnMouseExited(const MouseEvent& event); |
| 57 virtual bool OnKeyPressed(const KeyEvent& e); | 57 virtual bool OnKeyPressed(const KeyEvent& e); |
| 58 virtual bool OnKeyReleased(const KeyEvent& e); | 58 virtual bool OnKeyReleased(const KeyEvent& e); |
| 59 | 59 |
| 60 // Accessibility accessors, overridden from View. | 60 // Accessibility accessors, overridden from View. |
| 61 virtual std::wstring GetAccessibleDefaultAction(); | 61 virtual string16 GetAccessibleDefaultAction() OVERRIDE; |
| 62 virtual AccessibilityTypes::Role GetAccessibleRole(); | 62 virtual AccessibilityTypes::Role GetAccessibleRole() OVERRIDE; |
| 63 virtual AccessibilityTypes::State GetAccessibleState(); | 63 virtual AccessibilityTypes::State GetAccessibleState() OVERRIDE; |
| 64 | 64 |
| 65 // Returns views/MenuButton. | 65 // Returns views/MenuButton. |
| 66 virtual std::string GetClassName() const; | 66 virtual std::string GetClassName() const; |
| 67 | 67 |
| 68 // Accessors for menu_offset_. | 68 // Accessors for menu_offset_. |
| 69 const gfx::Point& menu_offset() const { | 69 const gfx::Point& menu_offset() const { |
| 70 return menu_offset_; | 70 return menu_offset_; |
| 71 } | 71 } |
| 72 | 72 |
| 73 void set_menu_offset(int x, int y) { | 73 void set_menu_offset(int x, int y) { |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 // If non-null the destuctor sets this to true. This is set while the menu is | 109 // If non-null the destuctor sets this to true. This is set while the menu is |
| 110 // showing and used to detect if the menu was deleted while running. | 110 // showing and used to detect if the menu was deleted while running. |
| 111 bool* destroyed_flag_; | 111 bool* destroyed_flag_; |
| 112 | 112 |
| 113 DISALLOW_COPY_AND_ASSIGN(MenuButton); | 113 DISALLOW_COPY_AND_ASSIGN(MenuButton); |
| 114 }; | 114 }; |
| 115 | 115 |
| 116 } // namespace views | 116 } // namespace views |
| 117 | 117 |
| 118 #endif // VIEWS_CONTROLS_BUTTON_MENU_BUTTON_H_ | 118 #endif // VIEWS_CONTROLS_BUTTON_MENU_BUTTON_H_ |
| OLD | NEW |