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

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

Issue 222923007: Implement SearchTabHelperDelegate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 8 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/browser.cc ('k') | chrome/browser/ui/search/search_tab_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/search/search_tab_helper.h
diff --git a/chrome/browser/ui/search/search_tab_helper.h b/chrome/browser/ui/search/search_tab_helper.h
index 00ee8afba4c9a424e77a0369359ebbe0795f4879..38e6bd080e917976924fd9e73f25d09c13b3e5cb 100644
--- a/chrome/browser/ui/search/search_tab_helper.h
+++ b/chrome/browser/ui/search/search_tab_helper.h
@@ -28,8 +28,10 @@ struct LoadCommittedDetails;
class GURL;
class InstantPageTest;
class InstantService;
+class OmniboxView;
class Profile;
class SearchIPCRouterTest;
+class SearchTabHelperDelegate;
// Per-tab search "helper". Acts as the owner and controller of the tab's
// search UI model.
@@ -92,6 +94,8 @@ class SearchTabHelper : public content::WebContentsObserver,
// Returns true if the underlying page is a search results page.
bool IsSearchResultsPage();
+ void set_delegate(SearchTabHelperDelegate* delegate) { delegate_ = delegate; }
+
private:
friend class content::WebContentsUserData<SearchTabHelper>;
friend class InstantPageTest;
@@ -211,6 +215,9 @@ class SearchTabHelper : public content::WebContentsObserver,
// active tab is in mode SEARCH_SUGGESTIONS.
bool IsInputInProgress() const;
+ // Returns the OmniboxView for |web_contents_| or NULL if not available.
+ OmniboxView* GetOmniboxView() const;
+
const bool is_search_enabled_;
// Model object for UI that cares about search state.
@@ -222,6 +229,11 @@ class SearchTabHelper : public content::WebContentsObserver,
InstantService* instant_service_;
+ // Delegate for notifying our owner about the SearchTabHelper state. Not owned
+ // by us.
+ // NULL on iOS and Android because they don't use the Instant framework.
+ SearchTabHelperDelegate* delegate_;
+
DISALLOW_COPY_AND_ASSIGN(SearchTabHelper);
};
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/search/search_tab_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698