Index: chrome/browser/instant/instant_loader_delegate.h |
diff --git a/chrome/browser/instant/instant_loader_delegate.h b/chrome/browser/instant/instant_loader_delegate.h |
index bf393a1ecd4a5cc0183028eafca0f4497639ca61..2540478437fbb8d7832b9243ec3f5dc50808b68e 100644 |
--- a/chrome/browser/instant/instant_loader_delegate.h |
+++ b/chrome/browser/instant/instant_loader_delegate.h |
@@ -5,10 +5,9 @@ |
#ifndef CHROME_BROWSER_INSTANT_INSTANT_LOADER_DELEGATE_H_ |
#define CHROME_BROWSER_INSTANT_INSTANT_LOADER_DELEGATE_H_ |
-#include "base/string16.h" |
-#include "chrome/common/instant_types.h" |
+#include <vector> |
-class GURL; |
+#include "chrome/common/instant_types.h" |
namespace gfx { |
class Rect; |
@@ -16,39 +15,34 @@ class Rect; |
class InstantLoader; |
-// InstantLoader's delegate. This interface is implemented by InstantController. |
+// |InstantLoader| calls these methods on its delegate (|InstantController|) |
+// to notify it of interesting events happening on the Instant preview. |
class InstantLoaderDelegate { |
public: |
- // Invoked when the status (either http_status_ok or ready) has changed. |
- virtual void InstantStatusChanged(InstantLoader* loader) = 0; |
- |
// Invoked when the loader has suggested text. |
- virtual void SetSuggestedTextFor( |
+ virtual void SetSuggestions( |
InstantLoader* loader, |
- const string16& text, |
+ const std::vector<std::string>& suggestions, |
InstantCompleteBehavior behavior) = 0; |
- // Returns the bounds of instant. |
- virtual gfx::Rect GetInstantBounds() = 0; |
- |
- // Returns true if instant should be committed on mouse up. |
- virtual bool ShouldCommitInstantOnMouseUp() = 0; |
- |
- // Invoked when the the loader should be committed. |
+ // Commit the preview. |
virtual void CommitInstantLoader(InstantLoader* loader) = 0; |
- // Invoked if the loader was created with the intention that the site supports |
- // instant, but it turned out the site doesn't support instant. |
- virtual void InstantLoaderDoesntSupportInstant(InstantLoader* loader) = 0; |
+ // Notification that the first page load (of the Instant URL) completed. |
+ virtual void InstantLoaderPreviewLoaded(InstantLoader* loader) = 0; |
- // Adds the specified url to the set of urls instant won't prefetch for. |
- virtual void AddToBlacklist(InstantLoader* loader, const GURL& url) = 0; |
+ // Notification when the loader has determined whether or not the page |
+ // supports the Instant API. |
+ virtual void InstantSupportDetermined(InstantLoader* loader, |
+ bool supports_instant) = 0; |
- // Invoked if the loader swaps to a different WebContents. |
+ // Notification that the loader swapped a different TabContents into the |
+ // preview, usually because a prerendered page was navigated to. |
virtual void SwappedTabContents(InstantLoader* loader) = 0; |
- // Invoked when the webcontents created by the loader is focused. |
- virtual void InstantLoaderContentsFocused() = 0; |
+ // Notification that the preview gained focus, usually due to the user |
+ // clicking on it. |
+ virtual void InstantLoaderContentsFocused(InstantLoader* loader) = 0; |
protected: |
virtual ~InstantLoaderDelegate() {} |