OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_INSTANT_INSTANT_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_ |
6 #define CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_ | 6 #define CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 // (until the search provider loads, then both return true). | 179 // (until the search provider loads, then both return true). |
180 bool MightSupportInstant(); | 180 bool MightSupportInstant(); |
181 | 181 |
182 // InstantLoaderDelegate | 182 // InstantLoaderDelegate |
183 virtual void ShowInstantLoader(InstantLoader* loader); | 183 virtual void ShowInstantLoader(InstantLoader* loader); |
184 virtual void SetSuggestedTextFor(InstantLoader* loader, | 184 virtual void SetSuggestedTextFor(InstantLoader* loader, |
185 const string16& text); | 185 const string16& text); |
186 virtual gfx::Rect GetInstantBounds(); | 186 virtual gfx::Rect GetInstantBounds(); |
187 virtual bool ShouldCommitInstantOnMouseUp(); | 187 virtual bool ShouldCommitInstantOnMouseUp(); |
188 virtual void CommitInstantLoader(InstantLoader* loader); | 188 virtual void CommitInstantLoader(InstantLoader* loader); |
189 virtual void InstantLoaderDoesntSupportInstant(InstantLoader* loader, | 189 virtual void InstantLoaderDoesntSupportInstant(InstantLoader* loader); |
190 bool needs_reload, | |
191 const GURL& url_to_load); | |
192 virtual void AddToBlacklist(InstantLoader* loader, const GURL& url); | 190 virtual void AddToBlacklist(InstantLoader* loader, const GURL& url); |
193 | 191 |
194 | 192 |
195 private: | 193 private: |
196 typedef std::set<std::string> HostBlacklist; | 194 typedef std::set<std::string> HostBlacklist; |
197 | 195 |
198 // Returns true if we should update immediately. | 196 // Returns true if we should update immediately. |
199 bool ShouldUpdateNow(TemplateURLID instant_id, const GURL& url); | 197 bool ShouldUpdateNow(TemplateURLID instant_id, const GURL& url); |
200 | 198 |
201 // Schedules a delayed update to load the specified url. | 199 // Schedules a delayed update to load the specified url. |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 ScopedVector<InstantLoader> loaders_to_destroy_; | 288 ScopedVector<InstantLoader> loaders_to_destroy_; |
291 | 289 |
292 // The set of hosts that we don't use instant with. This is shared across all | 290 // The set of hosts that we don't use instant with. This is shared across all |
293 // instances and only maintained for the current session. | 291 // instances and only maintained for the current session. |
294 static HostBlacklist* host_blacklist_; | 292 static HostBlacklist* host_blacklist_; |
295 | 293 |
296 DISALLOW_COPY_AND_ASSIGN(InstantController); | 294 DISALLOW_COPY_AND_ASSIGN(InstantController); |
297 }; | 295 }; |
298 | 296 |
299 #endif // CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_ | 297 #endif // CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_ |
OLD | NEW |