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

Side by Side Diff: chrome/browser/ui/toolbar/app_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_UI_TOOLBAR_APP_MENU_MODEL_H_ 5 #ifndef CHROME_BROWSER_UI_TOOLBAR_APP_MENU_MODEL_H_
6 #define CHROME_BROWSER_UI_TOOLBAR_APP_MENU_MODEL_H_ 6 #define CHROME_BROWSER_UI_TOOLBAR_APP_MENU_MODEL_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 // A menu model that builds the contents of an encoding menu. 78 // A menu model that builds the contents of an encoding menu.
79 class EncodingMenuModel : public ui::SimpleMenuModel, 79 class EncodingMenuModel : public ui::SimpleMenuModel,
80 public ui::SimpleMenuModel::Delegate { 80 public ui::SimpleMenuModel::Delegate {
81 public: 81 public:
82 explicit EncodingMenuModel(Browser* browser); 82 explicit EncodingMenuModel(Browser* browser);
83 ~EncodingMenuModel() override; 83 ~EncodingMenuModel() override;
84 84
85 // Overridden from ui::SimpleMenuModel::Delegate: 85 // Overridden from ui::SimpleMenuModel::Delegate:
86 bool IsCommandIdChecked(int command_id) const override; 86 bool IsCommandIdChecked(int command_id) const override;
87 bool IsCommandIdEnabled(int command_id) const override; 87 bool IsCommandIdEnabled(int command_id) const override;
88 bool GetAcceleratorForCommandId(int command_id,
89 ui::Accelerator* accelerator) const override;
90 void ExecuteCommand(int command_id, int event_flags) override; 88 void ExecuteCommand(int command_id, int event_flags) override;
91 89
92 private: 90 private:
93 void Build(); 91 void Build();
94 92
95 Browser* browser_; // weak 93 Browser* browser_; // weak
96 94
97 DISALLOW_COPY_AND_ASSIGN(EncodingMenuModel); 95 DISALLOW_COPY_AND_ASSIGN(EncodingMenuModel);
98 }; 96 };
99 97
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 Browser* browser_; // weak 245 Browser* browser_; // weak
248 246
249 std::unique_ptr<content::HostZoomMap::Subscription> 247 std::unique_ptr<content::HostZoomMap::Subscription>
250 browser_zoom_subscription_; 248 browser_zoom_subscription_;
251 content::NotificationRegistrar registrar_; 249 content::NotificationRegistrar registrar_;
252 250
253 DISALLOW_COPY_AND_ASSIGN(AppMenuModel); 251 DISALLOW_COPY_AND_ASSIGN(AppMenuModel);
254 }; 252 };
255 253
256 #endif // CHROME_BROWSER_UI_TOOLBAR_APP_MENU_MODEL_H_ 254 #endif // CHROME_BROWSER_UI_TOOLBAR_APP_MENU_MODEL_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/panel_extension_browsertest.cc ('k') | chrome/browser/ui/toolbar/app_menu_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698