Upload upstream chromium 114.0.5735.31
[platform/framework/web/chromium-efl.git] / components / search_engines / template_url_service_client.h
1 // Copyright 2014 The Chromium Authors
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 COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_CLIENT_H_
6 #define COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_CLIENT_H_
7
8 #include <string>
9
10 #include "components/search_engines/template_url_id.h"
11
12 class GURL;
13 class TemplateURLService;
14
15 // This interface provides history related functionality required by
16 // TemplateURLService.
17 // TODO(hashimoto): Get rid of this once HistoryService gets componentized.
18 class TemplateURLServiceClient {
19  public:
20   virtual ~TemplateURLServiceClient() {}
21
22   // Called by TemplateURLService::Shutdown as part of the two phase shutdown
23   // of the KeyedService.
24   virtual void Shutdown() = 0;
25
26   // Sets the pointer to the owner of this object.
27   virtual void SetOwner(TemplateURLService* owner) = 0;
28
29   // Deletes all search terms for the specified keyword.
30   virtual void DeleteAllSearchTermsForKeyword(TemplateURLID id) = 0;
31
32   // Sets the search terms for the specified url and keyword.
33   virtual void SetKeywordSearchTermsForURL(const GURL& url,
34                                            TemplateURLID id,
35                                            const std::u16string& term) = 0;
36
37   // Adds the given URL to history as a keyword generated visit.
38   virtual void AddKeywordGeneratedVisit(const GURL& url) = 0;
39 };
40
41 #endif  // COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_CLIENT_H_