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

Side by Side Diff: chrome/browser/ui/bookmarks/bookmark_context_menu_controller.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, 4 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_UI_BOOKMARKS_BOOKMARK_CONTEXT_MENU_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_BOOKMARKS_BOOKMARK_CONTEXT_MENU_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_BOOKMARKS_BOOKMARK_CONTEXT_MENU_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_BOOKMARKS_BOOKMARK_CONTEXT_MENU_CONTROLLER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 const bookmarks::BookmarkNode* parent, 60 const bookmarks::BookmarkNode* parent,
61 const std::vector<const bookmarks::BookmarkNode*>& selection); 61 const std::vector<const bookmarks::BookmarkNode*>& selection);
62 ~BookmarkContextMenuController() override; 62 ~BookmarkContextMenuController() override;
63 63
64 ui::SimpleMenuModel* menu_model() { return menu_model_.get(); } 64 ui::SimpleMenuModel* menu_model() { return menu_model_.get(); }
65 65
66 // ui::SimpleMenuModel::Delegate implementation: 66 // ui::SimpleMenuModel::Delegate implementation:
67 bool IsCommandIdChecked(int command_id) const override; 67 bool IsCommandIdChecked(int command_id) const override;
68 bool IsCommandIdEnabled(int command_id) const override; 68 bool IsCommandIdEnabled(int command_id) const override;
69 bool IsCommandIdVisible(int command_id) const override; 69 bool IsCommandIdVisible(int command_id) const override;
70 bool GetAcceleratorForCommandId(int command_id,
71 ui::Accelerator* accelerator) const override;
72 void ExecuteCommand(int command_id, int event_flags) override; 70 void ExecuteCommand(int command_id, int event_flags) override;
73 bool IsItemForCommandIdDynamic(int command_id) const override; 71 bool IsItemForCommandIdDynamic(int command_id) const override;
74 base::string16 GetLabelForCommandId(int command_id) const override; 72 base::string16 GetLabelForCommandId(int command_id) const override;
75 73
76 void set_navigator(content::PageNavigator* navigator) { 74 void set_navigator(content::PageNavigator* navigator) {
77 navigator_ = navigator; 75 navigator_ = navigator;
78 } 76 }
79 77
80 private: 78 private:
81 void BuildMenu(); 79 void BuildMenu();
(...skipping 18 matching lines...) Expand all
100 std::vector<const bookmarks::BookmarkNode*> selection_; 98 std::vector<const bookmarks::BookmarkNode*> selection_;
101 bookmarks::BookmarkModel* model_; 99 bookmarks::BookmarkModel* model_;
102 std::unique_ptr<ui::SimpleMenuModel> menu_model_; 100 std::unique_ptr<ui::SimpleMenuModel> menu_model_;
103 // Used to detect deletion of |this| executing a command. 101 // Used to detect deletion of |this| executing a command.
104 base::WeakPtrFactory<BookmarkContextMenuController> weak_factory_; 102 base::WeakPtrFactory<BookmarkContextMenuController> weak_factory_;
105 103
106 DISALLOW_COPY_AND_ASSIGN(BookmarkContextMenuController); 104 DISALLOW_COPY_AND_ASSIGN(BookmarkContextMenuController);
107 }; 105 };
108 106
109 #endif // CHROME_BROWSER_UI_BOOKMARKS_BOOKMARK_CONTEXT_MENU_CONTROLLER_H_ 107 #endif // CHROME_BROWSER_UI_BOOKMARKS_BOOKMARK_CONTEXT_MENU_CONTROLLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/autofill/autofill_dialog_models.cc ('k') | chrome/browser/ui/bookmarks/bookmark_context_menu_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698