| OLD | NEW |
| 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 Loading... |
| 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_ |
| OLD | NEW |