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.
5 #ifndef CHROME_BROWSER_UI_SEARCH_SEARCH_TAB_HELPER_DELEGATE_H_
6 #define CHROME_BROWSER_UI_SEARCH_SEARCH_TAB_HELPER_DELEGATE_H_
11 #include "ui/base/window_open_disposition.h"
20 // Objects implement this interface to get notified about changes in the
21 // SearchTabHelper and to provide necessary functionality.
22 class SearchTabHelperDelegate
{
24 // Navigates the page to |url| in response to a click event. Usually used
25 // by the page to navigate to privileged destinations (e.g. chrome:// URLs) or
26 // to navigate to URLs that are hidden from the page using Restricted IDs
29 // TODO(kmadhusu): Handle search results page navigations to privileged
30 // destinations in a seperate function. This function should handle only the
31 // new tab page thumbnail click events.
32 virtual void NavigateOnThumbnailClick(const GURL
& url
,
33 WindowOpenDisposition disposition
,
34 content::WebContents
* source_contents
);
36 // Invoked when the |web_contents| no longer supports Instant.
37 virtual void OnWebContentsInstantSupportDisabled(
38 const content::WebContents
* web_contents
);
40 // Returns the OmniboxView or NULL if not available.
41 virtual OmniboxView
* GetOmniboxView();
43 // Returns a set containing the canonical URLs of the currently open tabs.
44 virtual std::set
<std::string
> GetOpenUrls();
47 virtual ~SearchTabHelperDelegate();
50 #endif // CHROME_BROWSER_UI_SEARCH_SEARCH_TAB_HELPER_DELEGATE_H_