Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_LOADER_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_INSTANT_INSTANT_LOADER_DELEGATE_H_ |
| 6 #define CHROME_BROWSER_INSTANT_INSTANT_LOADER_DELEGATE_H_ | 6 #define CHROME_BROWSER_INSTANT_INSTANT_LOADER_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/string16.h" | 10 #include "base/string16.h" |
|
sreeram
2012/08/09 22:13:51
You can remove this header include.
Shishir
2012/08/10 18:16:57
Done.
| |
| 11 #include "chrome/common/instant_types.h" | 11 #include "chrome/common/instant_types.h" |
| 12 | 12 |
| 13 class InstantLoader; | 13 class InstantLoader; |
| 14 | 14 |
| 15 // InstantLoader calls these methods on its delegate (InstantController) | 15 // InstantLoader calls these methods on its delegate (InstantController) |
| 16 // to notify it of interesting events happening on the Instant preview. | 16 // to notify it of interesting events happening on the Instant preview. |
| 17 class InstantLoaderDelegate { | 17 class InstantLoaderDelegate { |
| 18 public: | 18 public: |
| 19 // Invoked when the loader has suggested text. | 19 // Invoked when the loader has suggested text. |
| 20 virtual void SetSuggestions( | 20 virtual void SetSuggestions( |
| 21 InstantLoader* loader, | 21 InstantLoader* loader, |
| 22 const std::vector<string16>& suggestions, | 22 const std::vector<InstantSuggestion>& suggestion) = 0; |
|
sreeram
2012/08/09 22:13:51
suggestion -> suggestions
Shishir
2012/08/10 18:16:57
Done.
| |
| 23 InstantCompleteBehavior behavior) = 0; | |
| 24 | 23 |
| 25 // Commit the preview. | 24 // Commit the preview. |
| 26 virtual void CommitInstantLoader(InstantLoader* loader) = 0; | 25 virtual void CommitInstantLoader(InstantLoader* loader) = 0; |
| 27 | 26 |
| 28 // Notification that the first page load (of the Instant URL) completed. | 27 // Notification that the first page load (of the Instant URL) completed. |
| 29 virtual void InstantLoaderPreviewLoaded(InstantLoader* loader) = 0; | 28 virtual void InstantLoaderPreviewLoaded(InstantLoader* loader) = 0; |
| 30 | 29 |
| 31 // Notification when the loader has determined whether or not the page | 30 // Notification when the loader has determined whether or not the page |
| 32 // supports the Instant API. | 31 // supports the Instant API. |
| 33 virtual void InstantSupportDetermined(InstantLoader* loader, | 32 virtual void InstantSupportDetermined(InstantLoader* loader, |
| 34 bool supports_instant) = 0; | 33 bool supports_instant) = 0; |
| 35 | 34 |
| 36 // Notification that the loader swapped a different TabContents into the | 35 // Notification that the loader swapped a different TabContents into the |
| 37 // preview, usually because a prerendered page was navigated to. | 36 // preview, usually because a prerendered page was navigated to. |
| 38 virtual void SwappedTabContents(InstantLoader* loader) = 0; | 37 virtual void SwappedTabContents(InstantLoader* loader) = 0; |
| 39 | 38 |
| 40 // Notification that the preview gained focus, usually due to the user | 39 // Notification that the preview gained focus, usually due to the user |
| 41 // clicking on it. | 40 // clicking on it. |
| 42 virtual void InstantLoaderContentsFocused(InstantLoader* loader) = 0; | 41 virtual void InstantLoaderContentsFocused(InstantLoader* loader) = 0; |
| 43 | 42 |
| 44 protected: | 43 protected: |
| 45 virtual ~InstantLoaderDelegate() {} | 44 virtual ~InstantLoaderDelegate() {} |
| 46 }; | 45 }; |
| 47 | 46 |
| 48 #endif // CHROME_BROWSER_INSTANT_INSTANT_LOADER_DELEGATE_H_ | 47 #endif // CHROME_BROWSER_INSTANT_INSTANT_LOADER_DELEGATE_H_ |
| OLD | NEW |