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

Side by Side Diff: views/controls/menu/native_menu_views.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/native_menu_gtk.cc ('k') | views/controls/menu/native_menu_views.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_NATIVE_MENU_LINUX_H_ 5 #ifndef VIEWS_CONTROLS_MENU_NATIVE_MENU_LINUX_H_
6 #define VIEWS_CONTROLS_MENU_NATIVE_MENU_LINUX_H_ 6 #define VIEWS_CONTROLS_MENU_NATIVE_MENU_LINUX_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 25 matching lines...) Expand all
36 virtual gfx::NativeMenu GetNativeMenu() const OVERRIDE; 36 virtual gfx::NativeMenu GetNativeMenu() const OVERRIDE;
37 virtual MenuAction GetMenuAction() const OVERRIDE; 37 virtual MenuAction GetMenuAction() const OVERRIDE;
38 virtual void AddMenuListener(MenuListener* listener) OVERRIDE; 38 virtual void AddMenuListener(MenuListener* listener) OVERRIDE;
39 virtual void RemoveMenuListener(MenuListener* listener) OVERRIDE; 39 virtual void RemoveMenuListener(MenuListener* listener) OVERRIDE;
40 virtual void SetMinimumWidth(int width) OVERRIDE; 40 virtual void SetMinimumWidth(int width) OVERRIDE;
41 41
42 // Overridden from MenuDelegate: 42 // Overridden from MenuDelegate:
43 virtual bool IsItemChecked(int id) const OVERRIDE; 43 virtual bool IsItemChecked(int id) const OVERRIDE;
44 virtual bool IsCommandEnabled(int id) const OVERRIDE; 44 virtual bool IsCommandEnabled(int id) const OVERRIDE;
45 virtual void ExecuteCommand(int id) OVERRIDE; 45 virtual void ExecuteCommand(int id) OVERRIDE;
46 virtual bool GetAccelerator(int id, views::Accelerator* accelerator) OVERRIDE; 46 virtual bool GetAccelerator(int id, ui::Accelerator* accelerator) OVERRIDE;
47 47
48 private: 48 private:
49 void AddMenuItemsFromModel(MenuItemView* parent, ui::MenuModel* model); 49 void AddMenuItemsFromModel(MenuItemView* parent, ui::MenuModel* model);
50 void UpdateMenuFromModel(SubmenuView* menu, ui::MenuModel* model); 50 void UpdateMenuFromModel(SubmenuView* menu, ui::MenuModel* model);
51 51
52 // The attached model and delegate. Does not assume ownership. 52 // The attached model and delegate. Does not assume ownership.
53 ui::MenuModel* model_; 53 ui::MenuModel* model_;
54 MenuItemView* root_; 54 MenuItemView* root_;
55 scoped_ptr<MenuRunner> menu_runner_; 55 scoped_ptr<MenuRunner> menu_runner_;
56 56
57 DISALLOW_COPY_AND_ASSIGN(NativeMenuViews); 57 DISALLOW_COPY_AND_ASSIGN(NativeMenuViews);
58 }; 58 };
59 59
60 } // namespace views 60 } // namespace views
61 61
62 #endif // VIEWS_CONTROLS_MENU_NATIVE_MENU_LINUX_H_ 62 #endif // VIEWS_CONTROLS_MENU_NATIVE_MENU_LINUX_H_
OLDNEW
« no previous file with comments | « views/controls/menu/native_menu_gtk.cc ('k') | views/controls/menu/native_menu_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698