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

Unified Diff: chrome/browser/ui/search/instant_page.h

Issue 2146943002: Merge InstantTag into InstantPage. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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/ui/search/instant_controller.cc ('k') | chrome/browser/ui/search/instant_page.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/search/instant_page.h
diff --git a/chrome/browser/ui/search/instant_page.h b/chrome/browser/ui/search/instant_page.h
index 0a04f1b5d894b6bc3998598066f405a4a4870cd2..23b6cb1fb4e640fb42d28d5b788631e740f70465 100644
--- a/chrome/browser/ui/search/instant_page.h
+++ b/chrome/browser/ui/search/instant_page.h
@@ -21,7 +21,6 @@ class WebContents;
// InstantPage is used to exchange messages with a page that implements the
// Instant/Embedded Search API (http://dev.chromium.org/embeddedsearch).
-// InstantPage is not used directly but via its derived class, InstantTab.
class InstantPage : public content::WebContentsObserver,
public SearchModelObserver {
public:
@@ -44,8 +43,14 @@ class InstantPage : public content::WebContentsObserver,
virtual ~Delegate();
};
+ explicit InstantPage(Delegate* delegate);
+
~InstantPage() override;
+ // Sets |web_contents| as the page to communicate with. |web_contents| may be
+ // NULL, which effectively stops all communication.
+ void Init(content::WebContents* web_contents);
+
// Returns true if the page is known to support the Instant API. This starts
// out false, and is set to true whenever we get any message from the page.
// Once true, it never becomes false (the page isn't expected to drop API
@@ -56,18 +61,6 @@ class InstantPage : public content::WebContentsObserver,
// chrome::kChromeSearchLocalNTPURL).
bool IsLocal() const;
- protected:
- explicit InstantPage(Delegate* delegate);
-
- // Sets |web_contents| as the page to communicate with. |web_contents| may be
- // NULL, which effectively stops all communication.
- void SetContents(content::WebContents* web_contents);
-
- Delegate* delegate() const { return delegate_; }
-
- // This method is called before processing messages received from the page.
- virtual bool ShouldProcessAboutToNavigateMainFrame();
-
private:
FRIEND_TEST_ALL_PREFIXES(InstantPageTest, IsLocal);
FRIEND_TEST_ALL_PREFIXES(InstantPageTest,
« no previous file with comments | « chrome/browser/ui/search/instant_controller.cc ('k') | chrome/browser/ui/search/instant_page.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698