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

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

Issue 8508055: Move views::Accelerator to ui in order to use it from aura code. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase Created 9 years, 1 month 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
« no previous file with comments | « views/controls/menu/menu_item_view.cc ('k') | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_MENU_MENU_MODEL_ADAPTER_H_ 5 #ifndef VIEWS_CONTROLS_MENU_MENU_MODEL_ADAPTER_H_
6 #define VIEWS_CONTROLS_MENU_MENU_MODEL_ADAPTER_H_ 6 #define VIEWS_CONTROLS_MENU_MENU_MODEL_ADAPTER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 10
(...skipping 28 matching lines...) Expand all
39 } 39 }
40 int triggerable_event_flags() const { return triggerable_event_flags_; } 40 int triggerable_event_flags() const { return triggerable_event_flags_; }
41 41
42 protected: 42 protected:
43 // views::MenuDelegate implementation. 43 // views::MenuDelegate implementation.
44 virtual void ExecuteCommand(int id) OVERRIDE; 44 virtual void ExecuteCommand(int id) OVERRIDE;
45 virtual void ExecuteCommand(int id, int mouse_event_flags) OVERRIDE; 45 virtual void ExecuteCommand(int id, int mouse_event_flags) OVERRIDE;
46 virtual bool IsTriggerableEvent(MenuItemView* source, 46 virtual bool IsTriggerableEvent(MenuItemView* source,
47 const MouseEvent& e) OVERRIDE; 47 const MouseEvent& e) OVERRIDE;
48 virtual bool GetAccelerator(int id, 48 virtual bool GetAccelerator(int id,
49 views::Accelerator* accelerator) OVERRIDE; 49 ui::Accelerator* accelerator) OVERRIDE;
50 virtual string16 GetLabel(int id) const OVERRIDE; 50 virtual string16 GetLabel(int id) const OVERRIDE;
51 virtual const gfx::Font& GetLabelFont(int id) const OVERRIDE; 51 virtual const gfx::Font& GetLabelFont(int id) const OVERRIDE;
52 virtual bool IsCommandEnabled(int id) const OVERRIDE; 52 virtual bool IsCommandEnabled(int id) const OVERRIDE;
53 virtual bool IsItemChecked(int id) const OVERRIDE; 53 virtual bool IsItemChecked(int id) const OVERRIDE;
54 virtual void SelectionChanged(MenuItemView* menu) OVERRIDE; 54 virtual void SelectionChanged(MenuItemView* menu) OVERRIDE;
55 virtual void WillShowMenu(MenuItemView* menu) OVERRIDE; 55 virtual void WillShowMenu(MenuItemView* menu) OVERRIDE;
56 virtual void WillHideMenu(MenuItemView* menu) OVERRIDE; 56 virtual void WillHideMenu(MenuItemView* menu) OVERRIDE;
57 57
58 private: 58 private:
59 // Implementation of BuildMenu(). index_offset is both input and output; 59 // Implementation of BuildMenu(). index_offset is both input and output;
(...skipping 11 matching lines...) Expand all
71 71
72 // Map MenuItems to MenuModels. Used to implement WillShowMenu(). 72 // Map MenuItems to MenuModels. Used to implement WillShowMenu().
73 std::map<MenuItemView*, ui::MenuModel*> menu_map_; 73 std::map<MenuItemView*, ui::MenuModel*> menu_map_;
74 74
75 DISALLOW_COPY_AND_ASSIGN(MenuModelAdapter); 75 DISALLOW_COPY_AND_ASSIGN(MenuModelAdapter);
76 }; 76 };
77 77
78 } // namespace views 78 } // namespace views
79 79
80 #endif // VIEWS_CONTROLS_MENU_MENU_MODEL_ADAPTER_H_ 80 #endif // VIEWS_CONTROLS_MENU_MENU_MODEL_ADAPTER_H_
OLDNEW
« no previous file with comments | « views/controls/menu/menu_item_view.cc ('k') | views/controls/menu/menu_model_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698