Revert of Add button to add new FSP services to Files app. (patchset #8 id:140001...
[chromium-blink-merge.git] / chrome / browser / ui / search / search_tab_helper_delegate.h
blob8bbbfe274c0274704b77bc3a3a958943cb738800
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_
8 #include <set>
9 #include <string>
11 #include "ui/base/window_open_disposition.h"
13 namespace content {
14 class WebContents;
17 class GURL;
18 class OmniboxView;
20 // Objects implement this interface to get notified about changes in the
21 // SearchTabHelper and to provide necessary functionality.
22 class SearchTabHelperDelegate {
23 public:
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
27 // (rid in the API).
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();
46 protected:
47 virtual ~SearchTabHelperDelegate();
50 #endif // CHROME_BROWSER_UI_SEARCH_SEARCH_TAB_HELPER_DELEGATE_H_