| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 virtual void SetSuggestedTextFor(InstantLoader* loader, | 177 virtual void SetSuggestedTextFor(InstantLoader* loader, |
| 178 const string16& text, | 178 const string16& text, |
| 179 InstantCompleteBehavior behavior) OVERRIDE; | 179 InstantCompleteBehavior behavior) OVERRIDE; |
| 180 virtual gfx::Rect GetInstantBounds() OVERRIDE; | 180 virtual gfx::Rect GetInstantBounds() OVERRIDE; |
| 181 virtual bool ShouldCommitInstantOnMouseUp() OVERRIDE; | 181 virtual bool ShouldCommitInstantOnMouseUp() OVERRIDE; |
| 182 virtual void CommitInstantLoader(InstantLoader* loader) OVERRIDE; | 182 virtual void CommitInstantLoader(InstantLoader* loader) OVERRIDE; |
| 183 virtual void InstantLoaderDoesntSupportInstant( | 183 virtual void InstantLoaderDoesntSupportInstant( |
| 184 InstantLoader* loader) OVERRIDE; | 184 InstantLoader* loader) OVERRIDE; |
| 185 virtual void AddToBlacklist(InstantLoader* loader, | 185 virtual void AddToBlacklist(InstantLoader* loader, |
| 186 const GURL& url) OVERRIDE; | 186 const GURL& url) OVERRIDE; |
| 187 virtual void SwappedTabContents(InstantLoader* loader) OVERRIDE; |
| 187 | 188 |
| 188 private: | 189 private: |
| 189 friend class InstantTest; | 190 friend class InstantTest; |
| 190 | 191 |
| 191 typedef std::set<std::string> HostBlacklist; | 192 typedef std::set<std::string> HostBlacklist; |
| 192 | 193 |
| 193 // Updates |displayable_loader_| and if necessary notifies the delegate. | 194 // Updates |displayable_loader_| and if necessary notifies the delegate. |
| 194 void UpdateDisplayableLoader(); | 195 void UpdateDisplayableLoader(); |
| 195 | 196 |
| 196 // Returns the TabContents of the pending loader (or NULL). This is only used | 197 // Returns the TabContents of the pending loader (or NULL). This is only used |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 ScopedVector<InstantLoader> loaders_to_destroy_; | 297 ScopedVector<InstantLoader> loaders_to_destroy_; |
| 297 | 298 |
| 298 // The set of hosts that we don't use instant with. This is shared across all | 299 // The set of hosts that we don't use instant with. This is shared across all |
| 299 // instances and only maintained for the current session. | 300 // instances and only maintained for the current session. |
| 300 static HostBlacklist* host_blacklist_; | 301 static HostBlacklist* host_blacklist_; |
| 301 | 302 |
| 302 DISALLOW_COPY_AND_ASSIGN(InstantController); | 303 DISALLOW_COPY_AND_ASSIGN(InstantController); |
| 303 }; | 304 }; |
| 304 | 305 |
| 305 #endif // CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_ | 306 #endif // CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_ |
| OLD | NEW |