OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_SEARCH_INSTANT_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_SEARCH_INSTANT_SERVICE_H_ |
6 #define CHROME_BROWSER_SEARCH_INSTANT_SERVICE_H_ | 6 #define CHROME_BROWSER_SEARCH_INSTANT_SERVICE_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 void OnRendererProcessTerminated(int process_id); | 128 void OnRendererProcessTerminated(int process_id); |
129 | 129 |
130 // Called when we get new most visited items from TopSites, registered as an | 130 // Called when we get new most visited items from TopSites, registered as an |
131 // async callback. Parses them and sends them to the renderer via | 131 // async callback. Parses them and sends them to the renderer via |
132 // SendMostVisitedItems. | 132 // SendMostVisitedItems. |
133 void OnMostVisitedItemsReceived(const history::MostVisitedURLList& data); | 133 void OnMostVisitedItemsReceived(const history::MostVisitedURLList& data); |
134 | 134 |
135 // Notifies the observer about the last known most visited items. | 135 // Notifies the observer about the last known most visited items. |
136 void NotifyAboutMostVisitedItems(); | 136 void NotifyAboutMostVisitedItems(); |
137 | 137 |
| 138 #if defined(ENABLE_THEMES) |
138 // Theme changed notification handler. | 139 // Theme changed notification handler. |
139 void OnThemeChanged(ThemeService* theme_service); | 140 void OnThemeChanged(ThemeService* theme_service); |
| 141 #endif |
140 | 142 |
141 void ResetInstantSearchPrerenderer(); | 143 void ResetInstantSearchPrerenderer(); |
142 | 144 |
143 Profile* const profile_; | 145 Profile* const profile_; |
144 | 146 |
145 // The TemplateURLService that we are observing. It will outlive this | 147 // The TemplateURLService that we are observing. It will outlive this |
146 // InstantService due to the dependency declared in InstantServiceFactory. | 148 // InstantService due to the dependency declared in InstantServiceFactory. |
147 TemplateURLService* template_url_service_; | 149 TemplateURLService* template_url_service_; |
148 | 150 |
149 // The process ids associated with Instant processes. | 151 // The process ids associated with Instant processes. |
(...skipping 23 matching lines...) Expand all Loading... |
173 scoped_ptr<TemplateURLData> previous_default_search_provider_; | 175 scoped_ptr<TemplateURLData> previous_default_search_provider_; |
174 GURL previous_google_base_url_; | 176 GURL previous_google_base_url_; |
175 | 177 |
176 // Used for Top Sites async retrieval. | 178 // Used for Top Sites async retrieval. |
177 base::WeakPtrFactory<InstantService> weak_ptr_factory_; | 179 base::WeakPtrFactory<InstantService> weak_ptr_factory_; |
178 | 180 |
179 DISALLOW_COPY_AND_ASSIGN(InstantService); | 181 DISALLOW_COPY_AND_ASSIGN(InstantService); |
180 }; | 182 }; |
181 | 183 |
182 #endif // CHROME_BROWSER_SEARCH_INSTANT_SERVICE_H_ | 184 #endif // CHROME_BROWSER_SEARCH_INSTANT_SERVICE_H_ |
OLD | NEW |