OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 COMPONENTS_RENDERER_CONTEXT_MENU_RENDER_TOOLKIT_DELEGATE_VIEWS_H_ | 5 #ifndef COMPONENTS_RENDERER_CONTEXT_MENU_RENDER_TOOLKIT_DELEGATE_VIEWS_H_ |
6 #define COMPONENTS_RENDERER_CONTEXT_MENU_RENDER_TOOLKIT_DELEGATE_VIEWS_H_ | 6 #define COMPONENTS_RENDERER_CONTEXT_MENU_RENDER_TOOLKIT_DELEGATE_VIEWS_H_ |
7 | 7 |
8 #include "components/renderer_context_menu/render_view_context_menu_base.h" | 8 #include "components/renderer_context_menu/render_view_context_menu_base.h" |
9 #include "ui/base/ui_base_types.h" | 9 #include "ui/base/ui_base_types.h" |
10 | 10 |
(...skipping 22 matching lines...) Expand all Loading... | |
33 ui::MenuSourceType type); | 33 ui::MenuSourceType type); |
34 | 34 |
35 private: | 35 private: |
36 // ToolkitDelegate: | 36 // ToolkitDelegate: |
37 void Init(ui::SimpleMenuModel* menu_model) override; | 37 void Init(ui::SimpleMenuModel* menu_model) override; |
38 void Cancel() override; | 38 void Cancel() override; |
39 void UpdateMenuItem(int command_id, | 39 void UpdateMenuItem(int command_id, |
40 bool enabled, | 40 bool enabled, |
41 bool hidden, | 41 bool hidden, |
42 const base::string16& title) override; | 42 const base::string16& title) override; |
43 void SetIcon(int command_id, | |
lazyboy
2015/02/09 23:45:23
nit: can fit in one line.
pals
2015/02/10 12:19:41
Done.
| |
44 const gfx::Image& icon) override; | |
43 | 45 |
44 scoped_ptr<views::MenuModelAdapter> menu_adapter_; | 46 scoped_ptr<views::MenuModelAdapter> menu_adapter_; |
45 scoped_ptr<views::MenuRunner> menu_runner_; | 47 scoped_ptr<views::MenuRunner> menu_runner_; |
46 | 48 |
47 // Weak. Owned by menu_runner_; | 49 // Weak. Owned by menu_runner_; |
48 views::MenuItemView* menu_view_; | 50 views::MenuItemView* menu_view_; |
49 | 51 |
50 DISALLOW_COPY_AND_ASSIGN(ToolkitDelegateViews); | 52 DISALLOW_COPY_AND_ASSIGN(ToolkitDelegateViews); |
51 }; | 53 }; |
52 | 54 |
53 #endif // COMPONENTS_RENDERER_CONTEXT_MENU_RENDER_TOOLKIT_DELEGATE_VIEWS_H_ | 55 #endif // COMPONENTS_RENDERER_CONTEXT_MENU_RENDER_TOOLKIT_DELEGATE_VIEWS_H_ |
OLD | NEW |