OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 CHROME_BROWSER_RENDERER_CONTEXT_MENU_MOCK_RENDER_VIEW_CONTEXT_MENU_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_CONTEXT_MENU_MOCK_RENDER_VIEW_CONTEXT_MENU_H_ |
6 #define CHROME_BROWSER_RENDERER_CONTEXT_MENU_MOCK_RENDER_VIEW_CONTEXT_MENU_H_ | 6 #define CHROME_BROWSER_RENDERER_CONTEXT_MENU_MOCK_RENDER_VIEW_CONTEXT_MENU_H_ |
7 | 7 |
8 #include <cstddef> | 8 #include <cstddef> |
9 #include <memory> | 9 #include <memory> |
10 #include <vector> | 10 #include <vector> |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 | 44 |
45 explicit MockRenderViewContextMenu(bool incognito); | 45 explicit MockRenderViewContextMenu(bool incognito); |
46 ~MockRenderViewContextMenu() override; | 46 ~MockRenderViewContextMenu() override; |
47 | 47 |
48 // SimpleMenuModel::Delegate implementation. | 48 // SimpleMenuModel::Delegate implementation. |
49 bool IsCommandIdChecked(int command_id) const override; | 49 bool IsCommandIdChecked(int command_id) const override; |
50 bool IsCommandIdEnabled(int command_id) const override; | 50 bool IsCommandIdEnabled(int command_id) const override; |
51 void ExecuteCommand(int command_id, int event_flags) override; | 51 void ExecuteCommand(int command_id, int event_flags) override; |
52 void MenuWillShow(ui::SimpleMenuModel* source) override; | 52 void MenuWillShow(ui::SimpleMenuModel* source) override; |
53 void MenuClosed(ui::SimpleMenuModel* source) override; | 53 void MenuClosed(ui::SimpleMenuModel* source) override; |
54 bool GetAcceleratorForCommandId(int command_id, | |
55 ui::Accelerator* accelerator) const override; | |
56 | 54 |
57 // RenderViewContextMenuProxy implementation. | 55 // RenderViewContextMenuProxy implementation. |
58 void AddMenuItem(int command_id, const base::string16& title) override; | 56 void AddMenuItem(int command_id, const base::string16& title) override; |
59 void AddCheckItem(int command_id, const base::string16& title) override; | 57 void AddCheckItem(int command_id, const base::string16& title) override; |
60 void AddSeparator() override; | 58 void AddSeparator() override; |
61 void AddSubMenu(int command_id, | 59 void AddSubMenu(int command_id, |
62 const base::string16& label, | 60 const base::string16& label, |
63 ui::MenuModel* model) override; | 61 ui::MenuModel* model) override; |
64 void UpdateMenuItem(int command_id, | 62 void UpdateMenuItem(int command_id, |
65 bool enabled, | 63 bool enabled, |
(...skipping 30 matching lines...) Expand all Loading... |
96 // Either |original_profile_| or its incognito profile. | 94 // Either |original_profile_| or its incognito profile. |
97 Profile* profile_; | 95 Profile* profile_; |
98 | 96 |
99 // A list of menu items added. | 97 // A list of menu items added. |
100 std::vector<MockMenuItem> items_; | 98 std::vector<MockMenuItem> items_; |
101 | 99 |
102 DISALLOW_COPY_AND_ASSIGN(MockRenderViewContextMenu); | 100 DISALLOW_COPY_AND_ASSIGN(MockRenderViewContextMenu); |
103 }; | 101 }; |
104 | 102 |
105 #endif // CHROME_BROWSER_RENDERER_CONTEXT_MENU_MOCK_RENDER_VIEW_CONTEXT_MENU_H_ | 103 #endif // CHROME_BROWSER_RENDERER_CONTEXT_MENU_MOCK_RENDER_VIEW_CONTEXT_MENU_H_ |
OLD | NEW |