Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(284)

Side by Side Diff: ui/views/controls/button/menu_button.h

Issue 10534092: Add touch gestures to views menu controls. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ReleaseCapture if capture was started. Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/views/controls/button/custom_button.cc ('k') | ui/views/controls/button/menu_button.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 50
51 // Overridden from TextButton for the potential use of a drop marker. 51 // Overridden from TextButton for the potential use of a drop marker.
52 virtual void PaintButton(gfx::Canvas* canvas, PaintButtonMode mode) OVERRIDE; 52 virtual void PaintButton(gfx::Canvas* canvas, PaintButtonMode mode) OVERRIDE;
53 53
54 // Overridden from View: 54 // Overridden from View:
55 virtual gfx::Size GetPreferredSize() OVERRIDE; 55 virtual gfx::Size GetPreferredSize() OVERRIDE;
56 virtual std::string GetClassName() const OVERRIDE; 56 virtual std::string GetClassName() const OVERRIDE;
57 virtual bool OnMousePressed(const MouseEvent& event) OVERRIDE; 57 virtual bool OnMousePressed(const MouseEvent& event) OVERRIDE;
58 virtual void OnMouseReleased(const MouseEvent& event) OVERRIDE; 58 virtual void OnMouseReleased(const MouseEvent& event) OVERRIDE;
59 virtual void OnMouseExited(const MouseEvent& event) OVERRIDE; 59 virtual void OnMouseExited(const MouseEvent& event) OVERRIDE;
60 virtual ui::GestureStatus OnGestureEvent(const GestureEvent& event) OVERRIDE;
60 virtual bool OnKeyPressed(const KeyEvent& event) OVERRIDE; 61 virtual bool OnKeyPressed(const KeyEvent& event) OVERRIDE;
61 virtual bool OnKeyReleased(const KeyEvent& event) OVERRIDE; 62 virtual bool OnKeyReleased(const KeyEvent& event) OVERRIDE;
62 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; 63 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE;
63 64
64 protected: 65 protected:
65 // True if the menu is currently visible. 66 // True if the menu is currently visible.
66 bool menu_visible_; 67 bool menu_visible_;
67 68
68 // Offset of the associated menu position. 69 // Offset of the associated menu position.
69 gfx::Point menu_offset_; 70 gfx::Point menu_offset_;
(...skipping 26 matching lines...) Expand all
96 // If non-null the destuctor sets this to true. This is set while the menu is 97 // If non-null the destuctor sets this to true. This is set while the menu is
97 // showing and used to detect if the menu was deleted while running. 98 // showing and used to detect if the menu was deleted while running.
98 bool* destroyed_flag_; 99 bool* destroyed_flag_;
99 100
100 DISALLOW_COPY_AND_ASSIGN(MenuButton); 101 DISALLOW_COPY_AND_ASSIGN(MenuButton);
101 }; 102 };
102 103
103 } // namespace views 104 } // namespace views
104 105
105 #endif // UI_VIEWS_CONTROLS_BUTTON_MENU_BUTTON_H_ 106 #endif // UI_VIEWS_CONTROLS_BUTTON_MENU_BUTTON_H_
OLDNEW
« no previous file with comments | « ui/views/controls/button/custom_button.cc ('k') | ui/views/controls/button/menu_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698