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

Side by Side Diff: ui/views/controls/menu/menu_model_adapter.h

Issue 10827271: Replace views::Event with ui::Event. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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/menu/menu_delegate.cc ('k') | ui/views/controls/menu/menu_model_adapter.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_MENU_MENU_MODEL_ADAPTER_H_ 5 #ifndef UI_VIEWS_CONTROLS_MENU_MENU_MODEL_ADAPTER_H_
6 #define UI_VIEWS_CONTROLS_MENU_MENU_MODEL_ADAPTER_H_ 6 #define UI_VIEWS_CONTROLS_MENU_MENU_MODEL_ADAPTER_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "ui/views/controls/menu/menu_delegate.h" 10 #include "ui/views/controls/menu/menu_delegate.h"
(...skipping 25 matching lines...) Expand all
36 void set_triggerable_event_flags(int triggerable_event_flags) { 36 void set_triggerable_event_flags(int triggerable_event_flags) {
37 triggerable_event_flags_ = triggerable_event_flags; 37 triggerable_event_flags_ = triggerable_event_flags;
38 } 38 }
39 int triggerable_event_flags() const { return triggerable_event_flags_; } 39 int triggerable_event_flags() const { return triggerable_event_flags_; }
40 40
41 protected: 41 protected:
42 // views::MenuDelegate implementation. 42 // views::MenuDelegate implementation.
43 virtual void ExecuteCommand(int id) OVERRIDE; 43 virtual void ExecuteCommand(int id) OVERRIDE;
44 virtual void ExecuteCommand(int id, int mouse_event_flags) OVERRIDE; 44 virtual void ExecuteCommand(int id, int mouse_event_flags) OVERRIDE;
45 virtual bool IsTriggerableEvent(MenuItemView* source, 45 virtual bool IsTriggerableEvent(MenuItemView* source,
46 const Event& e) OVERRIDE; 46 const ui::Event& e) OVERRIDE;
47 virtual bool GetAccelerator(int id, 47 virtual bool GetAccelerator(int id,
48 ui::Accelerator* accelerator) OVERRIDE; 48 ui::Accelerator* accelerator) OVERRIDE;
49 virtual string16 GetLabel(int id) const OVERRIDE; 49 virtual string16 GetLabel(int id) const OVERRIDE;
50 virtual const gfx::Font& GetLabelFont(int id) const OVERRIDE; 50 virtual const gfx::Font& GetLabelFont(int id) const OVERRIDE;
51 virtual bool IsCommandEnabled(int id) const OVERRIDE; 51 virtual bool IsCommandEnabled(int id) const OVERRIDE;
52 virtual bool IsItemChecked(int id) const OVERRIDE; 52 virtual bool IsItemChecked(int id) const OVERRIDE;
53 virtual void SelectionChanged(MenuItemView* menu) OVERRIDE; 53 virtual void SelectionChanged(MenuItemView* menu) OVERRIDE;
54 virtual void WillShowMenu(MenuItemView* menu) OVERRIDE; 54 virtual void WillShowMenu(MenuItemView* menu) OVERRIDE;
55 virtual void WillHideMenu(MenuItemView* menu) OVERRIDE; 55 virtual void WillHideMenu(MenuItemView* menu) OVERRIDE;
56 56
(...skipping 13 matching lines...) Expand all
70 70
71 // Map MenuItems to MenuModels. Used to implement WillShowMenu(). 71 // Map MenuItems to MenuModels. Used to implement WillShowMenu().
72 std::map<MenuItemView*, ui::MenuModel*> menu_map_; 72 std::map<MenuItemView*, ui::MenuModel*> menu_map_;
73 73
74 DISALLOW_COPY_AND_ASSIGN(MenuModelAdapter); 74 DISALLOW_COPY_AND_ASSIGN(MenuModelAdapter);
75 }; 75 };
76 76
77 } // namespace views 77 } // namespace views
78 78
79 #endif // UI_VIEWS_CONTROLS_MENU_MENU_MODEL_ADAPTER_H_ 79 #endif // UI_VIEWS_CONTROLS_MENU_MENU_MODEL_ADAPTER_H_
OLDNEW
« no previous file with comments | « ui/views/controls/menu/menu_delegate.cc ('k') | ui/views/controls/menu/menu_model_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698