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

Side by Side Diff: chrome/browser/ui/autofill/autofill_dialog_models.h

Issue 12207140: re-commit r181807: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 | Annotate | Revision Log
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 <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 20 matching lines...) Expand all
31 // index and item GUID. 31 // index and item GUID.
32 class SuggestionsMenuModel : public ui::SimpleMenuModel, 32 class SuggestionsMenuModel : public ui::SimpleMenuModel,
33 public ui::SimpleMenuModel::Delegate { 33 public ui::SimpleMenuModel::Delegate {
34 public: 34 public:
35 explicit SuggestionsMenuModel(SuggestionsMenuModelDelegate* delegate); 35 explicit SuggestionsMenuModel(SuggestionsMenuModelDelegate* delegate);
36 virtual ~SuggestionsMenuModel(); 36 virtual ~SuggestionsMenuModel();
37 37
38 // Adds an item and its identifying key to the model. Keys needn't be unique. 38 // Adds an item and its identifying key to the model. Keys needn't be unique.
39 void AddKeyedItem(const std::string& key, const string16& display_label); 39 void AddKeyedItem(const std::string& key, const string16& display_label);
40 40
41 // Resets the model to empty.
42 void Reset();
43
41 // Returns the ID key for the item at |index|. 44 // Returns the ID key for the item at |index|.
42 std::string GetItemKeyAt(int index) const; 45 std::string GetItemKeyAt(int index) const;
43 46
44 int checked_item() { return checked_item_; } 47 int checked_item() { return checked_item_; }
45 48
46 // ui::SimpleMenuModel::Delegate implementation. 49 // ui::SimpleMenuModel::Delegate implementation.
47 virtual bool IsCommandIdChecked(int command_id) const OVERRIDE; 50 virtual bool IsCommandIdChecked(int command_id) const OVERRIDE;
48 virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE; 51 virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE;
49 virtual bool GetAcceleratorForCommandId( 52 virtual bool GetAcceleratorForCommandId(
50 int command_id, 53 int command_id,
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 private: 95 private:
93 // The current year (e.g., 2012). 96 // The current year (e.g., 2012).
94 int this_year_; 97 int this_year_;
95 98
96 DISALLOW_COPY_AND_ASSIGN(YearComboboxModel); 99 DISALLOW_COPY_AND_ASSIGN(YearComboboxModel);
97 }; 100 };
98 101
99 } // autofill 102 } // autofill
100 103
101 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_MODELS_H_ 104 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_MODELS_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc ('k') | chrome/browser/ui/autofill/autofill_dialog_models.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698