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

Side by Side Diff: chrome/browser/ui/bookmarks/bookmark_context_menu_controller.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 (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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
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, 70 bool GetAcceleratorForCommandId(int command_id,
71 ui::Accelerator* accelerator) override; 71 ui::Accelerator* accelerator) const override;
72 void ExecuteCommand(int command_id, int event_flags) override; 72 void ExecuteCommand(int command_id, int event_flags) override;
73 bool IsItemForCommandIdDynamic(int command_id) const override; 73 bool IsItemForCommandIdDynamic(int command_id) const override;
74 base::string16 GetLabelForCommandId(int command_id) const override; 74 base::string16 GetLabelForCommandId(int command_id) const override;
75 75
76 void set_navigator(content::PageNavigator* navigator) { 76 void set_navigator(content::PageNavigator* navigator) {
77 navigator_ = navigator; 77 navigator_ = navigator;
78 } 78 }
79 79
80 private: 80 private:
81 void BuildMenu(); 81 void BuildMenu();
(...skipping 18 matching lines...) Expand all
100 std::vector<const bookmarks::BookmarkNode*> selection_; 100 std::vector<const bookmarks::BookmarkNode*> selection_;
101 bookmarks::BookmarkModel* model_; 101 bookmarks::BookmarkModel* model_;
102 std::unique_ptr<ui::SimpleMenuModel> menu_model_; 102 std::unique_ptr<ui::SimpleMenuModel> menu_model_;
103 // Used to detect deletion of |this| executing a command. 103 // Used to detect deletion of |this| executing a command.
104 base::WeakPtrFactory<BookmarkContextMenuController> weak_factory_; 104 base::WeakPtrFactory<BookmarkContextMenuController> weak_factory_;
105 105
106 DISALLOW_COPY_AND_ASSIGN(BookmarkContextMenuController); 106 DISALLOW_COPY_AND_ASSIGN(BookmarkContextMenuController);
107 }; 107 };
108 108
109 #endif // CHROME_BROWSER_UI_BOOKMARKS_BOOKMARK_CONTEXT_MENU_CONTROLLER_H_ 109 #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