Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Side by Side Diff: components/omnibox/autocomplete_provider_client.h

Issue 1185723002: Prepare HistoryProvider for componentization (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Response to review Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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 COMPONENTS_OMNIBOX_AUTOCOMPLETE_PROVIDER_CLIENT_H_ 5 #ifndef COMPONENTS_OMNIBOX_AUTOCOMPLETE_PROVIDER_CLIENT_H_
6 #define COMPONENTS_OMNIBOX_AUTOCOMPLETE_PROVIDER_CLIENT_H_ 6 #define COMPONENTS_OMNIBOX_AUTOCOMPLETE_PROVIDER_CLIENT_H_
7 7
8 #include "base/strings/string16.h" 8 #include "base/strings/string16.h"
9 #include "components/history/core/browser/keyword_id.h" 9 #include "components/history/core/browser/keyword_id.h"
10 #include "components/metrics/proto/omnibox_event.pb.h" 10 #include "components/metrics/proto/omnibox_event.pb.h"
11 11
12 struct AutocompleteMatch; 12 struct AutocompleteMatch;
13 class AutocompleteSchemeClassifier; 13 class AutocompleteSchemeClassifier;
14 class GURL; 14 class GURL;
15 15
16 namespace bookmarks {
17 class BookmarkModel;
18 }
19
16 namespace history { 20 namespace history {
21 class HistoryService;
17 class URLDatabase; 22 class URLDatabase;
18 } 23 }
19 24
20 namespace net { 25 namespace net {
21 class URLRequestContextGetter; 26 class URLRequestContextGetter;
22 } 27 }
23 28
24 class AutocompleteProviderClient { 29 class AutocompleteProviderClient {
25 public: 30 public:
26 virtual ~AutocompleteProviderClient() {} 31 virtual ~AutocompleteProviderClient() {}
(...skipping 10 matching lines...) Expand all
37 42
38 // Returns true when suggest support is enabled. 43 // Returns true when suggest support is enabled.
39 virtual bool SearchSuggestEnabled() = 0; 44 virtual bool SearchSuggestEnabled() = 0;
40 45
41 // Returns whether the bookmark bar is visible on all tabs. 46 // Returns whether the bookmark bar is visible on all tabs.
42 virtual bool ShowBookmarkBar() = 0; 47 virtual bool ShowBookmarkBar() = 0;
43 48
44 // Returns the scheme classifier. 49 // Returns the scheme classifier.
45 virtual const AutocompleteSchemeClassifier& SchemeClassifier() = 0; 50 virtual const AutocompleteSchemeClassifier& SchemeClassifier() = 0;
46 51
52 // Returns the HistoryService.
53 virtual history::HistoryService* HistoryService() = 0;
54
55 // Returns the bookmarks:BookmarkModel.
56 virtual bookmarks::BookmarkModel* BookmarkModel() = 0;
57
47 // Given some string |text| that the user wants to use for navigation, 58 // Given some string |text| that the user wants to use for navigation,
48 // determines how it should be interpreted. 59 // determines how it should be interpreted.
49 virtual void Classify( 60 virtual void Classify(
50 const base::string16& text, 61 const base::string16& text,
51 bool prefer_keyword, 62 bool prefer_keyword,
52 bool allow_exact_keyword_match, 63 bool allow_exact_keyword_match,
53 metrics::OmniboxEventProto::PageClassification page_classification, 64 metrics::OmniboxEventProto::PageClassification page_classification,
54 AutocompleteMatch* match, 65 AutocompleteMatch* match,
55 GURL* alternate_nav_url) = 0; 66 GURL* alternate_nav_url) = 0;
56 67
57 // Returns the in-memory URL database. 68 // Returns the in-memory URL database.
58 virtual history::URLDatabase* InMemoryDatabase() = 0; 69 virtual history::URLDatabase* InMemoryDatabase() = 0;
59 70
60 // Deletes all URL and search term entries matching the given |term| and 71 // Deletes all URL and search term entries matching the given |term| and
61 // |keyword_id| from history. 72 // |keyword_id| from history.
62 virtual void DeleteMatchingURLsForKeywordFromHistory( 73 virtual void DeleteMatchingURLsForKeywordFromHistory(
63 history::KeywordID keyword_id, 74 history::KeywordID keyword_id,
64 const base::string16& term) = 0; 75 const base::string16& term) = 0;
65 76
66 // Returns whether the user has tab sync enabled and tab sync is unencrypted. 77 // Returns whether the user has tab sync enabled and tab sync is unencrypted.
67 virtual bool TabSyncEnabledAndUnencrypted() = 0; 78 virtual bool TabSyncEnabledAndUnencrypted() = 0;
68 79
69 // Starts prefetching the image at the given |url|. 80 // Starts prefetching the image at the given |url|.
70 virtual void PrefetchImage(const GURL& url) = 0; 81 virtual void PrefetchImage(const GURL& url) = 0;
71 }; 82 };
72 83
73 #endif // COMPONENTS_OMNIBOX_AUTOCOMPLETE_PROVIDER_CLIENT_H_ 84 #endif // COMPONENTS_OMNIBOX_AUTOCOMPLETE_PROVIDER_CLIENT_H_
OLDNEW
« no previous file with comments | « chrome/browser/autocomplete/zero_suggest_provider_unittest.cc ('k') | components/omnibox/base_search_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698