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 UI_VIEWS_CONTROLS_BUTTON_MENU_BUTTON_H_ | 5 #ifndef UI_VIEWS_CONTROLS_BUTTON_MENU_BUTTON_H_ |
6 #define UI_VIEWS_CONTROLS_BUTTON_MENU_BUTTON_H_ | 6 #define UI_VIEWS_CONTROLS_BUTTON_MENU_BUTTON_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/string16.h" | 10 #include "base/string16.h" |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 // Overridden from TextButton for the potential use of a drop marker. | 56 // Overridden from TextButton for the potential use of a drop marker. |
57 virtual void PaintButton(gfx::Canvas* canvas, PaintButtonMode mode) OVERRIDE; | 57 virtual void PaintButton(gfx::Canvas* canvas, PaintButtonMode mode) OVERRIDE; |
58 | 58 |
59 // Overridden from View: | 59 // Overridden from View: |
60 virtual gfx::Size GetPreferredSize() OVERRIDE; | 60 virtual gfx::Size GetPreferredSize() OVERRIDE; |
61 virtual std::string GetClassName() const OVERRIDE; | 61 virtual std::string GetClassName() const OVERRIDE; |
62 virtual bool OnMousePressed(const MouseEvent& event) OVERRIDE; | 62 virtual bool OnMousePressed(const MouseEvent& event) OVERRIDE; |
63 virtual void OnMouseReleased(const MouseEvent& event) OVERRIDE; | 63 virtual void OnMouseReleased(const MouseEvent& event) OVERRIDE; |
64 virtual void OnMouseExited(const MouseEvent& event) OVERRIDE; | 64 virtual void OnMouseExited(const MouseEvent& event) OVERRIDE; |
65 virtual ui::GestureStatus OnGestureEvent(const GestureEvent& event) OVERRIDE; | 65 virtual ui::GestureStatus OnGestureEvent(const GestureEvent& event) OVERRIDE; |
66 virtual bool OnKeyPressed(const KeyEvent& event) OVERRIDE; | 66 virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE; |
67 virtual bool OnKeyReleased(const KeyEvent& event) OVERRIDE; | 67 virtual bool OnKeyReleased(const ui::KeyEvent& event) OVERRIDE; |
68 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; | 68 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; |
69 | 69 |
70 protected: | 70 protected: |
71 // True if the menu is currently visible. | 71 // True if the menu is currently visible. |
72 bool menu_visible_; | 72 bool menu_visible_; |
73 | 73 |
74 // Offset of the associated menu position. | 74 // Offset of the associated menu position. |
75 gfx::Point menu_offset_; | 75 gfx::Point menu_offset_; |
76 | 76 |
77 private: | 77 private: |
(...skipping 24 matching lines...) Expand all Loading... |
102 // If non-null the destuctor sets this to true. This is set while the menu is | 102 // If non-null the destuctor sets this to true. This is set while the menu is |
103 // showing and used to detect if the menu was deleted while running. | 103 // showing and used to detect if the menu was deleted while running. |
104 bool* destroyed_flag_; | 104 bool* destroyed_flag_; |
105 | 105 |
106 DISALLOW_COPY_AND_ASSIGN(MenuButton); | 106 DISALLOW_COPY_AND_ASSIGN(MenuButton); |
107 }; | 107 }; |
108 | 108 |
109 } // namespace views | 109 } // namespace views |
110 | 110 |
111 #endif // UI_VIEWS_CONTROLS_BUTTON_MENU_BUTTON_H_ | 111 #endif // UI_VIEWS_CONTROLS_BUTTON_MENU_BUTTON_H_ |
OLD | NEW |