Chromium Code Reviews| OLD | NEW |
|---|---|
| 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_H_ | 5 #ifndef COMPONENTS_OMNIBOX_AUTOCOMPLETE_PROVIDER_H_ |
| 6 #define COMPONENTS_OMNIBOX_AUTOCOMPLETE_PROVIDER_H_ | 6 #define COMPONENTS_OMNIBOX_AUTOCOMPLETE_PROVIDER_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 190 | 190 |
| 191 // Returns the set of matches for the current query. | 191 // Returns the set of matches for the current query. |
| 192 const ACMatches& matches() const { return matches_; } | 192 const ACMatches& matches() const { return matches_; } |
| 193 | 193 |
| 194 // Returns whether the provider is done processing the query. | 194 // Returns whether the provider is done processing the query. |
| 195 bool done() const { return done_; } | 195 bool done() const { return done_; } |
| 196 | 196 |
| 197 // Returns this provider's type. | 197 // Returns this provider's type. |
| 198 Type type() const { return type_; } | 198 Type type() const { return type_; } |
| 199 | 199 |
| 200 // Returns whether the provider should be used when the omnibox is focused. | |
|
Peter Kasting
2014/12/30 21:18:23
Nit: How about this comment and name:
// Return
jif
2014/12/31 19:02:26
Done.
| |
| 201 virtual bool ActivatedOnOmniboxFocus() const; | |
| 202 | |
| 200 // Returns a string describing this provider's type. | 203 // Returns a string describing this provider's type. |
| 201 const char* GetName() const; | 204 const char* GetName() const; |
| 202 | 205 |
| 203 // A suggested upper bound for how many matches a provider should return. | 206 // A suggested upper bound for how many matches a provider should return. |
| 204 // TODO(pkasting): http://b/1111299 , http://b/933133 This should go away once | 207 // TODO(pkasting): http://b/1111299 , http://b/933133 This should go away once |
| 205 // we have good relevance heuristics; the controller should handle all | 208 // we have good relevance heuristics; the controller should handle all |
| 206 // culling. | 209 // culling. |
| 207 static const size_t kMaxMatches; | 210 static const size_t kMaxMatches; |
| 208 | 211 |
| 209 protected: | 212 protected: |
| (...skipping 29 matching lines...) Expand all Loading... | |
| 239 ACMatches matches_; | 242 ACMatches matches_; |
| 240 bool done_; | 243 bool done_; |
| 241 | 244 |
| 242 Type type_; | 245 Type type_; |
| 243 | 246 |
| 244 private: | 247 private: |
| 245 DISALLOW_COPY_AND_ASSIGN(AutocompleteProvider); | 248 DISALLOW_COPY_AND_ASSIGN(AutocompleteProvider); |
| 246 }; | 249 }; |
| 247 | 250 |
| 248 #endif // COMPONENTS_OMNIBOX_AUTOCOMPLETE_PROVIDER_H_ | 251 #endif // COMPONENTS_OMNIBOX_AUTOCOMPLETE_PROVIDER_H_ |
| OLD | NEW |