Chromium Code Reviews| Index: chrome/browser/instant/instant_loader.h |
| diff --git a/chrome/browser/instant/instant_loader.h b/chrome/browser/instant/instant_loader.h |
| index 3aa5235bd92cf81c9304909f998d496deb39abf1..f43b7a7d9a8411316acaa9f6c630e8cd8c63fdee 100644 |
| --- a/chrome/browser/instant/instant_loader.h |
| +++ b/chrome/browser/instant/instant_loader.h |
| @@ -12,6 +12,7 @@ |
| #include "base/timer.h" |
| #include "chrome/browser/instant/instant_commit_type.h" |
| #include "chrome/browser/search_engines/template_url_id.h" |
| +#include "chrome/browser/ui/tab_contents/tab_contents_wrapper_delegate.h" |
| #include "chrome/common/instant_types.h" |
| #include "content/common/notification_observer.h" |
| #include "content/common/notification_registrar.h" |
| @@ -35,7 +36,8 @@ class TemplateURL; |
| // |
| // If the TemplateURLID supplied to the constructor is zero, then the url is |
| // loaded as is. |
| -class InstantLoader : public NotificationObserver { |
| +class InstantLoader : public NotificationObserver, |
| + public TabContentsWrapperDelegate { |
|
sky
2011/05/20 15:57:36
Make TabContentsWrapperDelegate implement this. It
dominich
2011/05/20 16:39:53
Done.
|
| public: |
| InstantLoader(InstantLoaderDelegate* delegate, TemplateURLID id); |
| virtual ~InstantLoader(); |
| @@ -74,6 +76,10 @@ class InstantLoader : public NotificationObserver { |
| const NotificationSource& source, |
| const NotificationDetails& details) OVERRIDE; |
| + // TabContentsWrapperDelegate implementation |
| + virtual void SwapTabContents(TabContentsWrapper* old_tc, |
| + TabContentsWrapper* new_tc) OVERRIDE; |
| + |
| // The preview TabContents; may be null. |
| TabContentsWrapper* preview_contents() const { |
| return preview_contents_.get(); |
| @@ -150,6 +156,9 @@ class InstantLoader : public NotificationObserver { |
| // waiting on the load and |force_if_loading| is false this does nothing. |
| void SendBoundsToPage(bool force_if_loading); |
| + // Called to set up the preview_contents_ when it is created or replaced. |
|
sky
2011/05/20 15:57:36
preview_contents_ -> |tab_contents|
But looking at
dominich
2011/05/20 16:39:53
The implementation should be using preview_content
sky
2011/05/20 18:54:19
My mistake. I was assuming tab_contents is the new
|
| + void SetupPreviewContents(TabContentsWrapper* tab_contents); |
| + |
| // Creates and sets the preview TabContentsWrapper. |
| void CreatePreviewContents(TabContentsWrapper* tab_contents); |