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

Side by Side Diff: chrome/browser/ui/search_engines/template_url_table_model.h

Issue 15805002: Modify extension omnibox keywords to be user-configurable (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Test updates Created 7 years, 6 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_SEARCH_ENGINES_TEMPLATE_URL_TABLE_MODEL_H_ 5 #ifndef CHROME_BROWSER_UI_SEARCH_ENGINES_TEMPLATE_URL_TABLE_MODEL_H_
6 #define CHROME_BROWSER_UI_SEARCH_ENGINES_TEMPLATE_URL_TABLE_MODEL_H_ 6 #define CHROME_BROWSER_UI_SEARCH_ENGINES_TEMPLATE_URL_TABLE_MODEL_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 // If there is an observer, it's notified the selected row has changed. 90 // If there is an observer, it's notified the selected row has changed.
91 void NotifyChanged(int index); 91 void NotifyChanged(int index);
92 92
93 TemplateURLService* template_url_service() const { 93 TemplateURLService* template_url_service() const {
94 return template_url_service_; 94 return template_url_service_;
95 } 95 }
96 96
97 // Returns the index of the last entry shown in the search engines group. 97 // Returns the index of the last entry shown in the search engines group.
98 int last_search_engine_index() const { return last_search_engine_index_; } 98 int last_search_engine_index() const { return last_search_engine_index_; }
99 99
100 // Returns the index of the last entry shown in the other search engines
101 // group.
102 int last_other_engine_index() const { return last_other_engine_index_; }
103
100 private: 104 private:
101 friend class ModelEntry; 105 friend class ModelEntry;
102 106
103 // Notification that a model entry has fetched its icon. 107 // Notification that a model entry has fetched its icon.
104 void FaviconAvailable(ModelEntry* entry); 108 void FaviconAvailable(ModelEntry* entry);
105 109
106 // TemplateURLServiceObserver notification. 110 // TemplateURLServiceObserver notification.
107 virtual void OnTemplateURLServiceChanged() OVERRIDE; 111 virtual void OnTemplateURLServiceChanged() OVERRIDE;
108 112
109 ui::TableModelObserver* observer_; 113 ui::TableModelObserver* observer_;
110 114
111 // The entries. 115 // The entries.
112 std::vector<ModelEntry*> entries_; 116 std::vector<ModelEntry*> entries_;
113 117
114 // The model we're displaying entries from. 118 // The model we're displaying entries from.
115 TemplateURLService* template_url_service_; 119 TemplateURLService* template_url_service_;
116 120
117 // Index of the last search engine in entries_. This is used to determine the 121 // Index of the last search engine in entries_. This is used to determine the
118 // group boundaries. 122 // group boundaries.
119 int last_search_engine_index_; 123 int last_search_engine_index_;
120 124
125 // Index of the last other engine in entries_. This is used to determine the
126 // group boundaries.
127 int last_other_engine_index_;
128
121 DISALLOW_COPY_AND_ASSIGN(TemplateURLTableModel); 129 DISALLOW_COPY_AND_ASSIGN(TemplateURLTableModel);
122 }; 130 };
123 131
124 132
125 #endif // CHROME_BROWSER_UI_SEARCH_ENGINES_TEMPLATE_URL_TABLE_MODEL_H_ 133 #endif // CHROME_BROWSER_UI_SEARCH_ENGINES_TEMPLATE_URL_TABLE_MODEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698