Index: chrome/browser/ui/search/search_tab_helper_delegate.h |
diff --git a/chrome/browser/ui/search/search_tab_helper_delegate.h b/chrome/browser/ui/search/search_tab_helper_delegate.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..491ec5971f1ae793f9b7644234a4b06e793ee69e |
--- /dev/null |
+++ b/chrome/browser/ui/search/search_tab_helper_delegate.h |
@@ -0,0 +1,48 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_BROWSER_UI_SEARCH_SEARCH_TAB_HELPER_DELEGATE_H_ |
+#define CHROME_BROWSER_UI_SEARCH_SEARCH_TAB_HELPER_DELEGATE_H_ |
+ |
+#include <vector> |
+ |
+#include "chrome/common/instant_types.h" |
+#include "ui/base/window_open_disposition.h" |
+ |
+namespace content { |
+class WebContents; |
+} |
+ |
+class GURL; |
+class OmniboxView; |
+ |
+// Objects implement this interface to get notified about changes in the |
+// SearchTabHelper and to provide necessary functionality. |
+class SearchTabHelperDelegate { |
Jered
2014/04/04 22:39:27
Why not make this abstract? A possible answer woul
kmadhusu
2014/04/07 21:44:15
In future, TabAndroid will implement this interfac
|
+ public: |
+ // Navigates the page to |url|. Usually used by the page to navigate to |
+ // privileged destinations (e.g. chrome:// URLs) or to navigate to URLs that |
+ // are hidden from the page using Restricted IDs (rid in the API). |
+ virtual void NavigateToURL(const GURL& url, |
+ WindowOpenDisposition disposition, |
+ content::WebContents* source_contents); |
+ |
+ // Invoked when the |web_contents| no longer supports Instant. |
+ virtual void OnWebContentsInstantSupportDisabled( |
+ const content::WebContents* web_contents); |
+ |
+ // 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. |
+ virtual void RemoveMostVisitedItemsMatchingOpenTabs( |
+ std::vector<InstantMostVisitedItem>* items); |
+ |
+ // Returns the OmniboxView or NULL if not available. |
+ virtual OmniboxView* GetOmniboxView(); |
+ |
+ protected: |
+ virtual ~SearchTabHelperDelegate(); |
+}; |
+ |
+#endif // CHROME_BROWSER_UI_SEARCH_SEARCH_TAB_HELPER_DELEGATE_H_ |