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

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

Issue 1671323002: [UI Views] Handle accelerators being pressed for buttons inside a menu (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Latest master Created 4 years, 10 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
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 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 const char* GetClassName() const override; 70 const char* GetClassName() const override;
71 void OnPaint(gfx::Canvas* canvas) override; 71 void OnPaint(gfx::Canvas* canvas) override;
72 bool OnMousePressed(const ui::MouseEvent& event) override; 72 bool OnMousePressed(const ui::MouseEvent& event) override;
73 void OnMouseReleased(const ui::MouseEvent& event) override; 73 void OnMouseReleased(const ui::MouseEvent& event) override;
74 void OnMouseEntered(const ui::MouseEvent& event) override; 74 void OnMouseEntered(const ui::MouseEvent& event) override;
75 void OnMouseExited(const ui::MouseEvent& event) override; 75 void OnMouseExited(const ui::MouseEvent& event) override;
76 void OnMouseMoved(const ui::MouseEvent& event) override; 76 void OnMouseMoved(const ui::MouseEvent& event) override;
77 void OnGestureEvent(ui::GestureEvent* event) override; 77 void OnGestureEvent(ui::GestureEvent* event) override;
78 bool OnKeyPressed(const ui::KeyEvent& event) override; 78 bool OnKeyPressed(const ui::KeyEvent& event) override;
79 bool OnKeyReleased(const ui::KeyEvent& event) override; 79 bool OnKeyReleased(const ui::KeyEvent& event) override;
80 bool AcceleratorPressed(const ui::Accelerator& accelerator) override;
80 void GetAccessibleState(ui::AXViewState* state) override; 81 void GetAccessibleState(ui::AXViewState* state) override;
81 82
82 protected: 83 protected:
83 // Paint the menu marker image. 84 // Paint the menu marker image.
84 void PaintMenuMarker(gfx::Canvas* canvas); 85 void PaintMenuMarker(gfx::Canvas* canvas);
85 86
86 // Overridden from LabelButton: 87 // Overridden from LabelButton:
87 gfx::Rect GetChildAreaBounds() override; 88 gfx::Rect GetChildAreaBounds() override;
88 89
89 // Overridden from CustomButton: 90 // Overridden from CustomButton:
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 bool should_disable_after_press_; 136 bool should_disable_after_press_;
136 137
137 base::WeakPtrFactory<MenuButton> weak_factory_; 138 base::WeakPtrFactory<MenuButton> weak_factory_;
138 139
139 DISALLOW_COPY_AND_ASSIGN(MenuButton); 140 DISALLOW_COPY_AND_ASSIGN(MenuButton);
140 }; 141 };
141 142
142 } // namespace views 143 } // namespace views
143 144
144 #endif // UI_VIEWS_CONTROLS_BUTTON_MENU_BUTTON_H_ 145 #endif // UI_VIEWS_CONTROLS_BUTTON_MENU_BUTTON_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/toolbar/toolbar_action_view_interactive_uitest.cc ('k') | ui/views/controls/button/menu_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698