Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(129)

Side by Side Diff: chrome/browser/search/instant_service.h

Issue 23455047: InstantExtended: Send search URLs to renderers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Handle TemplateURL change Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 content::WebContents* GetNTPContents() const; 95 content::WebContents* GetNTPContents() const;
96 96
97 // Notifies InstantService about the creation of a BrowserInstantController 97 // Notifies InstantService about the creation of a BrowserInstantController
98 // object. Used to preload InstantNTP. 98 // object. Used to preload InstantNTP.
99 void OnBrowserInstantControllerCreated(); 99 void OnBrowserInstantControllerCreated();
100 100
101 // Notifies InstantService about the destruction of a BrowserInstantController 101 // Notifies InstantService about the destruction of a BrowserInstantController
102 // object. Used to destroy the preloaded InstantNTP. 102 // object. Used to destroy the preloaded InstantNTP.
103 void OnBrowserInstantControllerDestroyed(); 103 void OnBrowserInstantControllerDestroyed();
104 104
105 // Sends the current set of search URLs to a renderer process.
106 void SendSearchURLsToRenderer(content::RenderProcessHost* rph);
107
105 private: 108 private:
106 friend class InstantExtendedTest; 109 friend class InstantExtendedTest;
107 friend class InstantTestBase; 110 friend class InstantTestBase;
108 111
109 FRIEND_TEST_ALL_PREFIXES(InstantExtendedNetworkTest, 112 FRIEND_TEST_ALL_PREFIXES(InstantExtendedNetworkTest,
110 NTPReactsToNetworkChanges); 113 NTPReactsToNetworkChanges);
111 FRIEND_TEST_ALL_PREFIXES(InstantExtendedManualTest, 114 FRIEND_TEST_ALL_PREFIXES(InstantExtendedManualTest,
112 MANUAL_ShowsGoogleNTP); 115 MANUAL_ShowsGoogleNTP);
113 FRIEND_TEST_ALL_PREFIXES(InstantExtendedManualTest, 116 FRIEND_TEST_ALL_PREFIXES(InstantExtendedManualTest,
114 MANUAL_SearchesFromFakebox); 117 MANUAL_SearchesFromFakebox);
115 FRIEND_TEST_ALL_PREFIXES(InstantExtendedTest, ProcessIsolation); 118 FRIEND_TEST_ALL_PREFIXES(InstantExtendedTest, ProcessIsolation);
116 119
117 // Overridden from BrowserContextKeyedService: 120 // Overridden from BrowserContextKeyedService:
118 virtual void Shutdown() OVERRIDE; 121 virtual void Shutdown() OVERRIDE;
119 122
120 // Overridden from content::NotificationObserver: 123 // Overridden from content::NotificationObserver:
121 virtual void Observe(int type, 124 virtual void Observe(int type,
122 const content::NotificationSource& source, 125 const content::NotificationSource& source,
123 const content::NotificationDetails& details) OVERRIDE; 126 const content::NotificationDetails& details) OVERRIDE;
124 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
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_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/search/instant_service.cc » ('j') | chrome/browser/search/instant_service.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698