| 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 <memory> | 8 #include <memory> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 // necessary. Investigate more and remove this from here. | 81 // necessary. Investigate more and remove this from here. |
| 82 void UpdateThemeInfo(); | 82 void UpdateThemeInfo(); |
| 83 | 83 |
| 84 // Invoked by the InstantController to update most visited items details for | 84 // Invoked by the InstantController to update most visited items details for |
| 85 // NTP. | 85 // NTP. |
| 86 void UpdateMostVisitedItemsInfo(); | 86 void UpdateMostVisitedItemsInfo(); |
| 87 | 87 |
| 88 // Sends the current set of search URLs to a renderer process. | 88 // Sends the current set of search URLs to a renderer process. |
| 89 void SendSearchURLsToRenderer(content::RenderProcessHost* rph); | 89 void SendSearchURLsToRenderer(content::RenderProcessHost* rph); |
| 90 | 90 |
| 91 // Used to validate that the URL the NTP is trying to navigate to is actually | |
| 92 // a URL on the most visited items / suggested items list. | |
| 93 bool IsValidURLForNavigation(const GURL& url) const; | |
| 94 | |
| 95 InstantSearchPrerenderer* instant_search_prerenderer() { | 91 InstantSearchPrerenderer* instant_search_prerenderer() { |
| 96 return instant_prerenderer_.get(); | 92 return instant_prerenderer_.get(); |
| 97 } | 93 } |
| 98 | 94 |
| 99 private: | 95 private: |
| 100 friend class InstantExtendedTest; | 96 friend class InstantExtendedTest; |
| 101 friend class InstantServiceTest; | 97 friend class InstantServiceTest; |
| 102 friend class InstantTestBase; | 98 friend class InstantTestBase; |
| 103 friend class InstantUnitTestBase; | 99 friend class InstantUnitTestBase; |
| 104 | 100 |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 suggestions::SuggestionsService::ResponseCallbackList::Subscription> | 186 suggestions::SuggestionsService::ResponseCallbackList::Subscription> |
| 191 suggestions_subscription_; | 187 suggestions_subscription_; |
| 192 | 188 |
| 193 // Used for Top Sites async retrieval. | 189 // Used for Top Sites async retrieval. |
| 194 base::WeakPtrFactory<InstantService> weak_ptr_factory_; | 190 base::WeakPtrFactory<InstantService> weak_ptr_factory_; |
| 195 | 191 |
| 196 DISALLOW_COPY_AND_ASSIGN(InstantService); | 192 DISALLOW_COPY_AND_ASSIGN(InstantService); |
| 197 }; | 193 }; |
| 198 | 194 |
| 199 #endif // CHROME_BROWSER_SEARCH_INSTANT_SERVICE_H_ | 195 #endif // CHROME_BROWSER_SEARCH_INSTANT_SERVICE_H_ |
| OLD | NEW |