Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1443)

Unified Diff: chrome/browser/ui/browser_instant_controller.h

Issue 11262015: Remove unused / unnecessary stuff from Instant. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove SuggestedTextView entirely Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/instant/instant_unload_handler.cc ('k') | chrome/browser/ui/browser_instant_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « chrome/browser/instant/instant_unload_handler.cc ('k') | chrome/browser/ui/browser_instant_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698