| 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 <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 FRIEND_TEST_ALL_PREFIXES(InstantExtendedTest, ProcessIsolation); | 115 FRIEND_TEST_ALL_PREFIXES(InstantExtendedTest, ProcessIsolation); |
| 116 | 116 |
| 117 // Overridden from BrowserContextKeyedService: | 117 // Overridden from BrowserContextKeyedService: |
| 118 virtual void Shutdown() OVERRIDE; | 118 virtual void Shutdown() OVERRIDE; |
| 119 | 119 |
| 120 // Overridden from content::NotificationObserver: | 120 // Overridden from content::NotificationObserver: |
| 121 virtual void Observe(int type, | 121 virtual void Observe(int type, |
| 122 const content::NotificationSource& source, | 122 const content::NotificationSource& source, |
| 123 const content::NotificationDetails& details) OVERRIDE; | 123 const content::NotificationDetails& details) OVERRIDE; |
| 124 | 124 |
| 125 // Called when a renderer process is created. |
| 126 void OnRendererProcessCreated(content::RenderProcessHost* rph); |
| 127 |
| 128 // Called when a renderer process is terminated. |
| 129 void OnRendererProcessTerminated(int process_id); |
| 130 |
| 125 // Called when we get new most visited items from TopSites, registered as an | 131 // Called when we get new most visited items from TopSites, registered as an |
| 126 // async callback. Parses them and sends them to the renderer via | 132 // async callback. Parses them and sends them to the renderer via |
| 127 // SendMostVisitedItems. | 133 // SendMostVisitedItems. |
| 128 void OnMostVisitedItemsReceived(const history::MostVisitedURLList& data); | 134 void OnMostVisitedItemsReceived(const history::MostVisitedURLList& data); |
| 129 | 135 |
| 130 // Notifies the observer about the last known most visited items. | 136 // Notifies the observer about the last known most visited items. |
| 131 void NotifyAboutMostVisitedItems(); | 137 void NotifyAboutMostVisitedItems(); |
| 132 | 138 |
| 133 // Theme changed notification handler. | 139 // Theme changed notification handler. |
| 134 void OnThemeChanged(ThemeService* theme_service); | 140 void OnThemeChanged(ThemeService* theme_service); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 159 // created for OTR browser windows). Used to preload and delete InstantNTP. | 165 // created for OTR browser windows). Used to preload and delete InstantNTP. |
| 160 size_t browser_instant_controller_object_count_; | 166 size_t browser_instant_controller_object_count_; |
| 161 | 167 |
| 162 // Used for Top Sites async retrieval. | 168 // Used for Top Sites async retrieval. |
| 163 base::WeakPtrFactory<InstantService> weak_ptr_factory_; | 169 base::WeakPtrFactory<InstantService> weak_ptr_factory_; |
| 164 | 170 |
| 165 DISALLOW_COPY_AND_ASSIGN(InstantService); | 171 DISALLOW_COPY_AND_ASSIGN(InstantService); |
| 166 }; | 172 }; |
| 167 | 173 |
| 168 #endif // CHROME_BROWSER_SEARCH_INSTANT_SERVICE_H_ | 174 #endif // CHROME_BROWSER_SEARCH_INSTANT_SERVICE_H_ |
| OLD | NEW |