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

Side by Side Diff: chrome/browser/renderer_context_menu/mock_render_view_context_menu.h

Issue 2133013002: AcceleratorProvider: Make GetAcceleratorForCommandId const. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix overrides on Mac and Chrome OS. Created 4 years, 5 months 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
OLDNEW
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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
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, 54 bool GetAcceleratorForCommandId(int command_id,
55 ui::Accelerator* accelerator) override; 55 ui::Accelerator* accelerator) const override;
56 56
57 // RenderViewContextMenuProxy implementation. 57 // RenderViewContextMenuProxy implementation.
58 void AddMenuItem(int command_id, const base::string16& title) override; 58 void AddMenuItem(int command_id, const base::string16& title) override;
59 void AddCheckItem(int command_id, const base::string16& title) override; 59 void AddCheckItem(int command_id, const base::string16& title) override;
60 void AddSeparator() override; 60 void AddSeparator() override;
61 void AddSubMenu(int command_id, 61 void AddSubMenu(int command_id,
62 const base::string16& label, 62 const base::string16& label,
63 ui::MenuModel* model) override; 63 ui::MenuModel* model) override;
64 void UpdateMenuItem(int command_id, 64 void UpdateMenuItem(int command_id,
65 bool enabled, 65 bool enabled,
(...skipping 30 matching lines...) Expand all
96 // Either |original_profile_| or its incognito profile. 96 // Either |original_profile_| or its incognito profile.
97 Profile* profile_; 97 Profile* profile_;
98 98
99 // A list of menu items added. 99 // A list of menu items added.
100 std::vector<MockMenuItem> items_; 100 std::vector<MockMenuItem> items_;
101 101
102 DISALLOW_COPY_AND_ASSIGN(MockRenderViewContextMenu); 102 DISALLOW_COPY_AND_ASSIGN(MockRenderViewContextMenu);
103 }; 103 };
104 104
105 #endif // CHROME_BROWSER_RENDERER_CONTEXT_MENU_MOCK_RENDER_VIEW_CONTEXT_MENU_H_ 105 #endif // CHROME_BROWSER_RENDERER_CONTEXT_MENU_MOCK_RENDER_VIEW_CONTEXT_MENU_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698