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

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: '' Created 6 years, 9 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
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..e0fc102cc647ede53ce17ab4df4458276cdd14aa 100644
--- a/chrome/browser/ui/search/search_tab_helper.h
+++ b/chrome/browser/ui/search/search_tab_helper.h
@@ -30,6 +30,7 @@ class InstantPageTest;
class InstantService;
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 +93,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;
@@ -181,11 +184,6 @@ class SearchTabHelper : public content::WebContentsObserver,
const std::vector<InstantMostVisitedItem>& items) OVERRIDE;
virtual void OmniboxStartMarginChanged(int omnibox_start_margin) OVERRIDE;
- // Removes recommended URLs if a matching URL is already open in the Browser,
- // if the Most Visited Tile Placement experiment is enabled, and the client is
- // in the experiment group.
- void MaybeRemoveMostVisitedItems(std::vector<InstantMostVisitedItem>* items);
-
// Sets the mode of the model based on the current URL of web_contents().
// Only updates the origin part of the mode if |update_origin| is true,
// otherwise keeps the current origin. If |is_preloaded_ntp| is true, the mode
@@ -222,6 +220,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);
};

Powered by Google App Engine
This is Rietveld 408576698