OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_UI_SEARCH_ENGINES_SEARCH_ENGINE_TAB_HELPER_DELEGATE_H_ | 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_ | 6 #define CHROME_BROWSER_UI_SEARCH_ENGINES_SEARCH_ENGINE_TAB_HELPER_DELEGATE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 class Profile; | 9 class Profile; |
10 class TabContents; | 10 class TabContents; |
11 class TemplateURL; | 11 class TemplateURL; |
12 class TemplateURLService; | |
13 | 12 |
14 // Objects implement this interface to get notified about changes in the | 13 // Objects implement this interface to get notified about changes in the |
15 // SearchEngineTabHelper and to provide necessary functionality. | 14 // SearchEngineTabHelper and to provide necessary functionality. |
16 class SearchEngineTabHelperDelegate { | 15 class SearchEngineTabHelperDelegate { |
17 public: | 16 public: |
18 // Shows a confirmation dialog box for setting the default search engine | 17 // Shows a confirmation dialog box for setting the default search engine |
19 // described by |template_url|. Takes ownership of |template_url|. | 18 // described by |template_url|. Takes ownership of |template_url|. |
20 virtual void ConfirmSetDefaultSearchProvider( | 19 virtual void ConfirmSetDefaultSearchProvider(TabContents* tab_contents, |
21 TabContents* tab_contents, | 20 TemplateURL* template_url, |
22 TemplateURL* template_url, | 21 Profile* profile) = 0; |
23 TemplateURLService* template_url_service) = 0; | |
24 | 22 |
25 // Shows a confirmation dialog box for adding a search engine described by | 23 // Shows a confirmation dialog box for adding a search engine described by |
26 // |template_url|. Takes ownership of |template_url|. | 24 // |template_url|. Takes ownership of |template_url|. |
27 virtual void ConfirmAddSearchProvider(const TemplateURL* template_url, | 25 virtual void ConfirmAddSearchProvider(const TemplateURL* template_url, |
28 Profile* profile) = 0; | 26 Profile* profile) = 0; |
29 | 27 |
30 protected: | 28 protected: |
31 virtual ~SearchEngineTabHelperDelegate(); | 29 virtual ~SearchEngineTabHelperDelegate(); |
32 }; | 30 }; |
33 | 31 |
34 #endif // CHROME_BROWSER_UI_SEARCH_ENGINES_SEARCH_ENGINE_TAB_HELPER_DELEGATE_H_ | 32 #endif // CHROME_BROWSER_UI_SEARCH_ENGINES_SEARCH_ENGINE_TAB_HELPER_DELEGATE_H_ |
OLD | NEW |