| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 // Returns the index of the last entry shown in the search engines group. | 92 // Returns the index of the last entry shown in the search engines group. |
| 93 int last_search_engine_index() const { return last_search_engine_index_; } | 93 int last_search_engine_index() const { return last_search_engine_index_; } |
| 94 | 94 |
| 95 private: | 95 private: |
| 96 friend class ModelEntry; | 96 friend class ModelEntry; |
| 97 | 97 |
| 98 // Notification that a model entry has fetched its icon. | 98 // Notification that a model entry has fetched its icon. |
| 99 void FaviconAvailable(ModelEntry* entry); | 99 void FaviconAvailable(ModelEntry* entry); |
| 100 | 100 |
| 101 // TemplateURLServiceObserver notification. | 101 // TemplateURLServiceObserver notification. |
| 102 virtual void OnTemplateURLServiceChanged(); | 102 virtual void OnTemplateURLServiceChanged() OVERRIDE; |
| 103 | 103 |
| 104 ui::TableModelObserver* observer_; | 104 ui::TableModelObserver* observer_; |
| 105 | 105 |
| 106 // The entries. | 106 // The entries. |
| 107 std::vector<ModelEntry*> entries_; | 107 std::vector<ModelEntry*> entries_; |
| 108 | 108 |
| 109 // The model we're displaying entries from. | 109 // The model we're displaying entries from. |
| 110 TemplateURLService* template_url_service_; | 110 TemplateURLService* template_url_service_; |
| 111 | 111 |
| 112 // Index of the last search engine in entries_. This is used to determine the | 112 // Index of the last search engine in entries_. This is used to determine the |
| 113 // group boundaries. | 113 // group boundaries. |
| 114 int last_search_engine_index_; | 114 int last_search_engine_index_; |
| 115 | 115 |
| 116 DISALLOW_COPY_AND_ASSIGN(TemplateURLTableModel); | 116 DISALLOW_COPY_AND_ASSIGN(TemplateURLTableModel); |
| 117 }; | 117 }; |
| 118 | 118 |
| 119 | 119 |
| 120 #endif // CHROME_BROWSER_UI_SEARCH_ENGINES_TEMPLATE_URL_TABLE_MODEL_H_ | 120 #endif // CHROME_BROWSER_UI_SEARCH_ENGINES_TEMPLATE_URL_TABLE_MODEL_H_ |
| OLD | NEW |