1 // Copyright (c) 2010 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_SEARCH_ENGINES_TEMPLATE_URL_FETCHER_CALLBACKS_H_ 6 #define CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_FETCHER_CALLBACKS_H_ 7 #pragma once 8 9 class Profile; 10 class TemplateURL; 11 class TemplateURLModel; 12 13 // Callbacks for the TemplateURLFetcher. 14 class TemplateURLFetcherCallbacks { 15 public: 16 TemplateURLFetcherCallbacks() {} 17 virtual ~TemplateURLFetcherCallbacks() {} 18 19 // Performs the confirmation step for setting the default search engine 20 // described by |template_url|. Takes ownership of |template_url|. 21 virtual void ConfirmSetDefaultSearchProvider( 22 TemplateURL* template_url, 23 TemplateURLModel* template_url_model) = 0; 24 25 // Performs the confirmation step for adding a search engine described by 26 // |template_url|. Takes ownership of |template_url|. 27 virtual void ConfirmAddSearchProvider( 28 TemplateURL* template_url, 29 Profile* profile) = 0; 30 }; 31 32 #endif // CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_FETCHER_CALLBACKS_H_ 33