| 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 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/time.h" | 10 #include "base/time.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 // Overridden to take into account the potential use of a drop marker. | 52 // Overridden to take into account the potential use of a drop marker. |
| 53 virtual gfx::Size GetPreferredSize(); | 53 virtual gfx::Size GetPreferredSize(); |
| 54 virtual void Paint(gfx::Canvas* canvas, bool for_drag); | 54 virtual void Paint(gfx::Canvas* canvas, bool for_drag); |
| 55 | 55 |
| 56 // These methods are overriden to implement a simple push button | 56 // These methods are overriden to implement a simple push button |
| 57 // behavior | 57 // behavior |
| 58 virtual bool OnMousePressed(const MouseEvent& e); | 58 virtual bool OnMousePressed(const MouseEvent& e); |
| 59 virtual void OnMouseReleased(const MouseEvent& e, bool canceled); | 59 virtual void OnMouseReleased(const MouseEvent& e, bool canceled); |
| 60 virtual void OnMouseExited(const MouseEvent& event); | 60 virtual void OnMouseExited(const MouseEvent& event); |
| 61 virtual bool OnKeyPressed(const KeyEvent& e); | 61 virtual bool OnKeyPressed(const KeyEvent& e); |
| 62 virtual bool OnKeyReleased(const KeyEvent& e); |
| 62 | 63 |
| 63 // Accessibility accessors, overridden from View. | 64 // Accessibility accessors, overridden from View. |
| 64 virtual bool GetAccessibleDefaultAction(std::wstring* action); | 65 virtual bool GetAccessibleDefaultAction(std::wstring* action); |
| 65 virtual bool GetAccessibleRole(AccessibilityTypes::Role* role); | 66 virtual bool GetAccessibleRole(AccessibilityTypes::Role* role); |
| 66 virtual bool GetAccessibleState(AccessibilityTypes::State* state); | 67 virtual bool GetAccessibleState(AccessibilityTypes::State* state); |
| 67 | 68 |
| 68 // Returns views/MenuButton. | 69 // Returns views/MenuButton. |
| 69 virtual std::string GetClassName() const; | 70 virtual std::string GetClassName() const; |
| 70 | 71 |
| 71 protected: | 72 protected: |
| (...skipping 28 matching lines...) Expand all Loading... |
| 100 // If non-null the destuctor sets this to true. This is set while the menu is | 101 // If non-null the destuctor sets this to true. This is set while the menu is |
| 101 // showing and used to detect if the menu was deleted while running. | 102 // showing and used to detect if the menu was deleted while running. |
| 102 bool* destroyed_flag_; | 103 bool* destroyed_flag_; |
| 103 | 104 |
| 104 DISALLOW_COPY_AND_ASSIGN(MenuButton); | 105 DISALLOW_COPY_AND_ASSIGN(MenuButton); |
| 105 }; | 106 }; |
| 106 | 107 |
| 107 } // namespace views | 108 } // namespace views |
| 108 | 109 |
| 109 #endif // VIEWS_CONTROLS_BUTTON_MENU_BUTTON_H_ | 110 #endif // VIEWS_CONTROLS_BUTTON_MENU_BUTTON_H_ |
| OLD | NEW |