| Index: chrome/browser/ui/browser_instant_controller.h
|
| diff --git a/chrome/browser/ui/browser_instant_controller.h b/chrome/browser/ui/browser_instant_controller.h
|
| index 2eeb699143cdde9758b701754ea8460e252a7139..24e68688de7cccc6d196fd5bdd18cd0bf0fdac93 100644
|
| --- a/chrome/browser/ui/browser_instant_controller.h
|
| +++ b/chrome/browser/ui/browser_instant_controller.h
|
| @@ -10,7 +10,6 @@
|
| #include "base/memory/scoped_ptr.h"
|
| #include "base/prefs/public/pref_change_registrar.h"
|
| #include "base/string16.h"
|
| -#include "chrome/browser/instant/instant_controller_delegate.h"
|
| #include "chrome/browser/instant/instant_unload_handler.h"
|
| #include "chrome/browser/ui/search/search_model_observer.h"
|
| #include "chrome/browser/ui/tabs/tab_strip_model_observer.h"
|
| @@ -34,8 +33,7 @@ class Rect;
|
|
|
| namespace chrome {
|
|
|
| -class BrowserInstantController : public InstantControllerDelegate,
|
| - public TabStripModelObserver,
|
| +class BrowserInstantController : public TabStripModelObserver,
|
| public search::SearchModelObserver,
|
| public content::NotificationObserver {
|
| public:
|
| @@ -50,14 +48,24 @@ class BrowserInstantController : public InstantControllerDelegate,
|
| // this BrowserInstantController.
|
| InstantController* instant() const { return instant_.get(); }
|
|
|
| - private:
|
| - // Overridden from InstantControllerDelegate:
|
| - virtual void CommitInstant(TabContents* preview, bool in_new_tab) OVERRIDE;
|
| - virtual void SetInstantSuggestion(
|
| - const InstantSuggestion& suggestion) OVERRIDE;
|
| - virtual gfx::Rect GetInstantBounds() OVERRIDE;
|
| - virtual void InstantPreviewFocused() OVERRIDE;
|
| - virtual TabContents* GetActiveTabContents() const OVERRIDE;
|
| + // Invoked by |instant_| to commit the |preview| by merging it into the active
|
| + // tab or adding it as a new tab. We take ownership of |preview|.
|
| + void CommitInstant(TabContents* preview, bool in_new_tab);
|
| +
|
| + // Invoked by |instant_| to autocomplete the |suggestion| into the omnibox.
|
| + void SetInstantSuggestion(const InstantSuggestion& suggestion);
|
| +
|
| + // Invoked by |instant_| to get the bounds that the preview is placed at,
|
| + // in screen coordinated.
|
| + gfx::Rect GetInstantBounds();
|
| +
|
| + // Invoked by |instant_| to notify that the preview gained focus, usually due
|
| + // to the user clicking on it.
|
| + void InstantPreviewFocused();
|
| +
|
| + // Invoked by |instant_| to get the currently active tab, over which the
|
| + // preview would be shown.
|
| + TabContents* GetActiveTabContents() const;
|
|
|
| // Overridden from content::NotificationObserver:
|
| virtual void Observe(int type,
|
| @@ -82,7 +90,7 @@ class BrowserInstantController : public InstantControllerDelegate,
|
|
|
| PrefChangeRegistrar profile_pref_registrar_;
|
|
|
| - DISALLOW_IMPLICIT_CONSTRUCTORS(BrowserInstantController);
|
| + DISALLOW_COPY_AND_ASSIGN(BrowserInstantController);
|
| };
|
|
|
| } // namespace chrome
|
|
|