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

Side by Side Diff: components/translate/core/browser/options_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, 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 COMPONENTS_TRANSLATE_CORE_BROWSER_OPTIONS_MENU_MODEL_H_ 5 #ifndef COMPONENTS_TRANSLATE_CORE_BROWSER_OPTIONS_MENU_MODEL_H_
6 #define COMPONENTS_TRANSLATE_CORE_BROWSER_OPTIONS_MENU_MODEL_H_ 6 #define COMPONENTS_TRANSLATE_CORE_BROWSER_OPTIONS_MENU_MODEL_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "ui/base/models/simple_menu_model.h" 9 #include "ui/base/models/simple_menu_model.h"
10 10
(...skipping 14 matching lines...) Expand all
25 NEVER_TRANSLATE_SITE, 25 NEVER_TRANSLATE_SITE,
26 REPORT_BAD_DETECTION 26 REPORT_BAD_DETECTION
27 }; 27 };
28 28
29 explicit OptionsMenuModel(TranslateInfoBarDelegate* translate_delegate); 29 explicit OptionsMenuModel(TranslateInfoBarDelegate* translate_delegate);
30 ~OptionsMenuModel() override; 30 ~OptionsMenuModel() override;
31 31
32 // ui::SimpleMenuModel::Delegate implementation: 32 // ui::SimpleMenuModel::Delegate implementation:
33 bool IsCommandIdChecked(int command_id) const override; 33 bool IsCommandIdChecked(int command_id) const override;
34 bool IsCommandIdEnabled(int command_id) const override; 34 bool IsCommandIdEnabled(int command_id) const override;
35 bool GetAcceleratorForCommandId(int command_id,
36 ui::Accelerator* accelerator) const override;
37 void ExecuteCommand(int command_id, int event_flags) override; 35 void ExecuteCommand(int command_id, int event_flags) override;
38 36
39 private: 37 private:
40 TranslateInfoBarDelegate* translate_infobar_delegate_; 38 TranslateInfoBarDelegate* translate_infobar_delegate_;
41 39
42 DISALLOW_COPY_AND_ASSIGN(OptionsMenuModel); 40 DISALLOW_COPY_AND_ASSIGN(OptionsMenuModel);
43 }; 41 };
44 42
45 } // namespace translate 43 } // namespace translate
46 44
47 #endif // COMPONENTS_TRANSLATE_CORE_BROWSER_OPTIONS_MENU_MODEL_H_ 45 #endif // COMPONENTS_TRANSLATE_CORE_BROWSER_OPTIONS_MENU_MODEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698