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

Side by Side Diff: chrome/browser/extensions/extension_context_menu_model.h

Issue 2140963002: Added default implementations of GetAcceleratorForCommandId. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@acceleratorprovider-const
Patch Set: Rebase. 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_EXTENSIONS_EXTENSION_CONTEXT_MENU_MODEL_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_CONTEXT_MENU_MODEL_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_CONTEXT_MENU_MODEL_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_CONTEXT_MENU_MODEL_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 // ShowPopupForDevToolsWindow() to be called on |delegate|. 73 // ShowPopupForDevToolsWindow() to be called on |delegate|.
74 ExtensionContextMenuModel(const Extension* extension, 74 ExtensionContextMenuModel(const Extension* extension,
75 Browser* browser, 75 Browser* browser,
76 ButtonVisibility visibility, 76 ButtonVisibility visibility,
77 PopupDelegate* delegate); 77 PopupDelegate* delegate);
78 ~ExtensionContextMenuModel() override; 78 ~ExtensionContextMenuModel() override;
79 79
80 // SimpleMenuModel::Delegate: 80 // SimpleMenuModel::Delegate:
81 bool IsCommandIdChecked(int command_id) const override; 81 bool IsCommandIdChecked(int command_id) const override;
82 bool IsCommandIdEnabled(int command_id) const override; 82 bool IsCommandIdEnabled(int command_id) const override;
83 bool GetAcceleratorForCommandId(int command_id,
84 ui::Accelerator* accelerator) const override;
85 void ExecuteCommand(int command_id, int event_flags) override; 83 void ExecuteCommand(int command_id, int event_flags) override;
86 84
87 ui::SimpleMenuModel* page_access_submenu_for_testing() { 85 ui::SimpleMenuModel* page_access_submenu_for_testing() {
88 return page_access_submenu_.get(); 86 return page_access_submenu_.get();
89 } 87 }
90 88
91 private: 89 private:
92 void InitMenu(const Extension* extension, ButtonVisibility button_visibility); 90 void InitMenu(const Extension* extension, ButtonVisibility button_visibility);
93 91
94 void CreatePageAccessSubmenu(const Extension* extension); 92 void CreatePageAccessSubmenu(const Extension* extension);
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 std::unique_ptr<ContextMenuMatcher> extension_items_; 134 std::unique_ptr<ContextMenuMatcher> extension_items_;
137 135
138 std::unique_ptr<ui::SimpleMenuModel> page_access_submenu_; 136 std::unique_ptr<ui::SimpleMenuModel> page_access_submenu_;
139 137
140 DISALLOW_COPY_AND_ASSIGN(ExtensionContextMenuModel); 138 DISALLOW_COPY_AND_ASSIGN(ExtensionContextMenuModel);
141 }; 139 };
142 140
143 } // namespace extensions 141 } // namespace extensions
144 142
145 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_CONTEXT_MENU_MODEL_H_ 143 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_CONTEXT_MENU_MODEL_H_
OLDNEW
« no previous file with comments | « chrome/browser/download/download_shelf_context_menu.cc ('k') | chrome/browser/extensions/extension_context_menu_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698