Home | History | Annotate | Download | only in search_engines
      1 // Copyright (c) 2011 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_ENGINES_SEARCH_ENGINE_TAB_HELPER_DELEGATE_H_
      6 #define CHROME_BROWSER_UI_SEARCH_ENGINES_SEARCH_ENGINE_TAB_HELPER_DELEGATE_H_
      7 #pragma once
      8 
      9 class Profile;
     10 class TabContents;
     11 class TemplateURL;
     12 class TemplateURLModel;
     13 
     14 // Objects implement this interface to get notified about changes in the
     15 // SearchEngineTabHelper and to provide necessary functionality.
     16 class SearchEngineTabHelperDelegate {
     17  public:
     18   // Shows a confirmation dialog box for setting the default search engine
     19   // described by |template_url|. Takes ownership of |template_url|.
     20   virtual void ConfirmSetDefaultSearchProvider(
     21       TabContents* tab_contents,
     22       TemplateURL* template_url,
     23       TemplateURLModel* template_url_model) = 0;
     24 
     25   // Shows a confirmation dialog box for adding a search engine described by
     26   // |template_url|. Takes ownership of |template_url|.
     27   virtual void ConfirmAddSearchProvider(const TemplateURL* template_url,
     28                                         Profile* profile) = 0;
     29 
     30  protected:
     31   virtual ~SearchEngineTabHelperDelegate();
     32 };
     33 
     34 #endif  // CHROME_BROWSER_UI_SEARCH_ENGINES_SEARCH_ENGINE_TAB_HELPER_DELEGATE_H_
     35