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

Unified Diff: chrome/browser/autocomplete/autocomplete_controller.h

Issue 10699032: autocomplete: Extract AutocompleteResult from autocomplete.*. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: move comments Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/autocomplete/autocomplete.cc ('k') | chrome/browser/autocomplete/autocomplete_provider.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autocomplete/autocomplete_controller.h
diff --git a/chrome/browser/autocomplete/autocomplete_controller.h b/chrome/browser/autocomplete/autocomplete_controller.h
index afe4f52e47fadaa854e25e801a6c23f0b2a8966f..5a0722e92b451d79443f9c9d6be6e4ae9cd74098 100644
--- a/chrome/browser/autocomplete/autocomplete_controller.h
+++ b/chrome/browser/autocomplete/autocomplete_controller.h
@@ -13,6 +13,7 @@
#include "base/timer.h"
#include "chrome/browser/autocomplete/autocomplete.h"
#include "chrome/browser/autocomplete/autocomplete_provider_listener.h"
+#include "chrome/browser/autocomplete/autocomplete_result.h"
#include "chrome/browser/autocomplete/autocomplete_types.h"
class AutocompleteControllerDelegate;
@@ -20,6 +21,24 @@ class KeywordProvider;
class Profile;
class SearchProvider;
+// The AutocompleteController is the center of the autocomplete system. A
+// class creates an instance of the controller, which in turn creates a set of
+// AutocompleteProviders to serve it. The owning class can ask the controller
+// to Start() a query; the controller in turn passes this call down to the
+// providers, each of which keeps track of its own matches and whether it has
+// finished processing the query. When a provider gets more matches or finishes
+// processing, it notifies the controller, which merges the combined matches
+// together and makes the result available to interested observers.
+//
+// The owner may also cancel the current query by calling Stop(), which the
+// controller will in turn communicate to all the providers. No callbacks will
+// happen after a request has been stopped.
+//
+// IMPORTANT: There is NO THREAD SAFETY built into this portion of the
+// autocomplete system. All calls to and from the AutocompleteController should
+// happen on the same thread. AutocompleteProviders are responsible for doing
+// their own thread management when they need to return matches asynchronously.
+//
// The coordinator for autocomplete queries, responsible for combining the
// matches from a series of providers into one AutocompleteResult.
class AutocompleteController : public AutocompleteProviderListener {
« no previous file with comments | « chrome/browser/autocomplete/autocomplete.cc ('k') | chrome/browser/autocomplete/autocomplete_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698