Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_UI_SEARCH_SEARCH_TAB_HELPER_DELEGATE_H_ | |
| 6 #define CHROME_BROWSER_UI_SEARCH_SEARCH_TAB_HELPER_DELEGATE_H_ | |
| 7 | |
| 8 #include <vector> | |
| 9 | |
| 10 #include "chrome/common/instant_types.h" | |
| 11 #include "ui/base/window_open_disposition.h" | |
| 12 | |
| 13 namespace content { | |
| 14 class WebContents; | |
| 15 } | |
| 16 | |
| 17 class GURL; | |
| 18 class OmniboxView; | |
| 19 | |
| 20 // Objects implement this interface to get notified about changes in the | |
| 21 // SearchTabHelper and to provide necessary functionality. | |
| 22 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
| |
| 23 public: | |
| 24 // Navigates the page to |url|. Usually used by the page to navigate to | |
| 25 // privileged destinations (e.g. chrome:// URLs) or to navigate to URLs that | |
| 26 // are hidden from the page using Restricted IDs (rid in the API). | |
| 27 virtual void NavigateToURL(const GURL& url, | |
| 28 WindowOpenDisposition disposition, | |
| 29 content::WebContents* source_contents); | |
| 30 | |
| 31 // Invoked when the |web_contents| no longer supports Instant. | |
| 32 virtual void OnWebContentsInstantSupportDisabled( | |
| 33 const content::WebContents* web_contents); | |
| 34 | |
| 35 // Removes recommended URLs if a matching URL is already open in the Browser, | |
| 36 // if the Most Visited Tile Placement experiment is enabled, and the client is | |
| 37 // in the experiment group. | |
| 38 virtual void RemoveMostVisitedItemsMatchingOpenTabs( | |
| 39 std::vector<InstantMostVisitedItem>* items); | |
| 40 | |
| 41 // Returns the OmniboxView or NULL if not available. | |
| 42 virtual OmniboxView* GetOmniboxView(); | |
| 43 | |
| 44 protected: | |
| 45 virtual ~SearchTabHelperDelegate(); | |
| 46 }; | |
| 47 | |
| 48 #endif // CHROME_BROWSER_UI_SEARCH_SEARCH_TAB_HELPER_DELEGATE_H_ | |
| OLD | NEW |