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

Unified Diff: chrome/browser/instant/instant_tab.h

Issue 11824050: InstantExtended: Committed NTP (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Undo to fix blacklisting. Created 7 years, 10 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_page.cc ('k') | chrome/browser/instant/instant_tab.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/instant/instant_tab.h
diff --git a/chrome/browser/instant/instant_tab.h b/chrome/browser/instant/instant_tab.h
index 8546c08458e4c254dd23f7c49a8d3f1558108116..bbc675d8bcaa2706331332fc1026a9d8140c4f1b 100644
--- a/chrome/browser/instant/instant_tab.h
+++ b/chrome/browser/instant/instant_tab.h
@@ -5,68 +5,27 @@
#ifndef CHROME_BROWSER_INSTANT_INSTANT_TAB_H_
#define CHROME_BROWSER_INSTANT_INSTANT_TAB_H_
-#include <vector>
-
#include "base/basictypes.h"
#include "base/compiler_specific.h"
-#include "base/string16.h"
-#include "chrome/browser/instant/instant_client.h"
-
-struct InstantAutocompleteResult;
-class InstantController;
-
-namespace content {
-class WebContents;
-}
+#include "chrome/browser/instant/instant_page.h"
-// InstantTab is used to communicate with a committed search results page, i.e.,
-// an actual tab on the tab strip (compare: InstantLoader, which has a preview
-// page that appears and disappears as the user types in the omnibox).
-class InstantTab : public InstantClient::Delegate {
+// InstantTab represents a committed page (i.e. an actual tab on the tab strip)
+// that supports the Instant API.
+class InstantTab : public InstantPage {
public:
- // Doesn't take ownership of either |controller| or |contents|.
- InstantTab(InstantController* controller, content::WebContents* contents);
+ explicit InstantTab(InstantPage::Delegate* delegate);
virtual ~InstantTab();
- content::WebContents* contents() const { return contents_; }
-
- // Start observing |contents_| for messages. Sends a message to determine if
+ // Start observing |contents| for messages. Sends a message to determine if
// the page supports the Instant API.
- void Init();
-
- // Calls through to methods of the same name on InstantClient.
- void Update(const string16& text,
- size_t selection_start,
- size_t selection_end,
- bool verbatim);
- void Submit(const string16& text);
- void SendAutocompleteResults(
- const std::vector<InstantAutocompleteResult>& results);
- void SetDisplayInstantResults(bool display_instant_results);
- void UpOrDownKeyPressed(int count);
- void SetMarginSize(int start, int end);
- void InitializeFonts();
+ void Init(content::WebContents* contents);
private:
- // Overridden from InstantClient::Delegate:
- virtual void SetSuggestions(
- const std::vector<InstantSuggestion>& suggestions) OVERRIDE;
- virtual void InstantSupportDetermined(bool supports_instant) OVERRIDE;
- virtual void ShowInstantPreview(InstantShownReason reason,
- int height,
- InstantSizeUnits units) OVERRIDE;
- virtual void StartCapturingKeyStrokes() OVERRIDE;
- virtual void StopCapturingKeyStrokes() OVERRIDE;
- virtual void RenderViewGone() OVERRIDE;
- virtual void AboutToNavigateMainFrame(const GURL& url) OVERRIDE;
- virtual void NavigateToURL(const GURL& url,
- content::PageTransition transition) OVERRIDE;
- virtual void RenderViewCreated() OVERRIDE;
-
- InstantClient client_;
- InstantController* const controller_;
- content::WebContents* const contents_;
- bool supports_instant_;
+ // Overridden from InstantPage:
+ virtual bool ShouldProcessSetSuggestions() OVERRIDE;
+ virtual bool ShouldProcessStartCapturingKeyStrokes() OVERRIDE;
+ virtual bool ShouldProcessStopCapturingKeyStrokes() OVERRIDE;
+ virtual bool ShouldProcessNavigateToURL() OVERRIDE;
DISALLOW_COPY_AND_ASSIGN(InstantTab);
};
« no previous file with comments | « chrome/browser/instant/instant_page.cc ('k') | chrome/browser/instant/instant_tab.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698