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

Side by Side Diff: chrome/browser/ui/autofill/autofill_dialog_models.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_AUTOFILL_AUTOFILL_DIALOG_MODELS_H_ 5 #ifndef CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_MODELS_H_
6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_MODELS_H_ 6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_MODELS_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 78
79 int checked_item() const { return checked_item_; } 79 int checked_item() const { return checked_item_; }
80 80
81 // Enable/disable an item by key. 81 // Enable/disable an item by key.
82 void SetEnabled(const std::string& item_key, bool enabled); 82 void SetEnabled(const std::string& item_key, bool enabled);
83 83
84 // ui::SimpleMenuModel::Delegate implementation. 84 // ui::SimpleMenuModel::Delegate implementation.
85 bool IsCommandIdChecked(int command_id) const override; 85 bool IsCommandIdChecked(int command_id) const override;
86 bool IsCommandIdEnabled(int command_id) const override; 86 bool IsCommandIdEnabled(int command_id) const override;
87 bool GetAcceleratorForCommandId(int command_id, 87 bool GetAcceleratorForCommandId(int command_id,
88 ui::Accelerator* accelerator) override; 88 ui::Accelerator* accelerator) const override;
89 void ExecuteCommand(int command_id, int event_flags) override; 89 void ExecuteCommand(int command_id, int event_flags) override;
90 90
91 private: 91 private:
92 // Represents an item in this model. 92 // Represents an item in this model.
93 struct Item { 93 struct Item {
94 std::string key; // The key of the item. 94 std::string key; // The key of the item.
95 bool enabled; // Whether the item is selectable. 95 bool enabled; // Whether the item is selectable.
96 }; 96 };
97 // The items this model represents in presentation order. 97 // The items this model represents in presentation order.
98 // Note: the index in this vector is the |command_id| of the item. 98 // Note: the index in this vector is the |command_id| of the item.
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 private: 139 private:
140 // The current year (e.g., 2012). 140 // The current year (e.g., 2012).
141 int this_year_; 141 int this_year_;
142 142
143 DISALLOW_COPY_AND_ASSIGN(YearComboboxModel); 143 DISALLOW_COPY_AND_ASSIGN(YearComboboxModel);
144 }; 144 };
145 145
146 } // namespace autofill 146 } // namespace autofill
147 147
148 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_MODELS_H_ 148 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_MODELS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698