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 |
11 #include "base/gtest_prod_util.h" | 11 #include "base/gtest_prod_util.h" |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "base/memory/scoped_ptr.h" |
13 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
14 #include "base/observer_list.h" | 15 #include "base/observer_list.h" |
15 #include "components/history/core/browser/history_types.h" | 16 #include "components/history/core/browser/history_types.h" |
16 #include "components/history/core/browser/top_sites_observer.h" | 17 #include "components/history/core/browser/top_sites_observer.h" |
17 #include "components/keyed_service/core/keyed_service.h" | 18 #include "components/keyed_service/core/keyed_service.h" |
18 #include "components/search_engines/template_url_service_observer.h" | 19 #include "components/search_engines/template_url_service_observer.h" |
19 #include "components/suggestions/proto/suggestions.pb.h" | 20 #include "components/suggestions/proto/suggestions.pb.h" |
20 #include "components/suggestions/suggestions_service.h" | 21 #include "components/suggestions/suggestions_service.h" |
21 #include "content/public/browser/notification_observer.h" | 22 #include "content/public/browser/notification_observer.h" |
22 #include "content/public/browser/notification_registrar.h" | 23 #include "content/public/browser/notification_registrar.h" |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 scoped_ptr<InstantSearchPrerenderer> instant_prerenderer_; | 178 scoped_ptr<InstantSearchPrerenderer> instant_prerenderer_; |
178 | 179 |
179 // Used to check whether notifications from TemplateURLService indicate a | 180 // Used to check whether notifications from TemplateURLService indicate a |
180 // change that affects the default search provider. | 181 // change that affects the default search provider. |
181 scoped_ptr<TemplateURLData> previous_default_search_provider_; | 182 scoped_ptr<TemplateURLData> previous_default_search_provider_; |
182 GURL previous_google_base_url_; | 183 GURL previous_google_base_url_; |
183 | 184 |
184 // Suggestions Service to fetch server suggestions. | 185 // Suggestions Service to fetch server suggestions. |
185 suggestions::SuggestionsService* suggestions_service_; | 186 suggestions::SuggestionsService* suggestions_service_; |
186 | 187 |
| 188 // Subscription to the SuggestionsService. |
| 189 scoped_ptr< |
| 190 suggestions::SuggestionsService::ResponseCallbackList::Subscription> |
| 191 suggestions_subscription_; |
| 192 |
187 // Used for Top Sites async retrieval. | 193 // Used for Top Sites async retrieval. |
188 base::WeakPtrFactory<InstantService> weak_ptr_factory_; | 194 base::WeakPtrFactory<InstantService> weak_ptr_factory_; |
189 | 195 |
190 DISALLOW_COPY_AND_ASSIGN(InstantService); | 196 DISALLOW_COPY_AND_ASSIGN(InstantService); |
191 }; | 197 }; |
192 | 198 |
193 #endif // CHROME_BROWSER_SEARCH_INSTANT_SERVICE_H_ | 199 #endif // CHROME_BROWSER_SEARCH_INSTANT_SERVICE_H_ |
OLD | NEW |