| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_H_ | 5 #ifndef CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_H_ |
| 6 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_H_ | 6 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/gtest_prod_util.h" | 13 #include "base/gtest_prod_util.h" |
| 14 #include "base/logging.h" | 14 #include "base/logging.h" |
| 15 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
| 16 #include "base/string16.h" | 16 #include "base/string16.h" |
| 17 #include "base/time.h" | 17 #include "base/time.h" |
| 18 #include "base/timer.h" | 18 #include "base/timer.h" |
| 19 #include "chrome/browser/sessions/session_id.h" | 19 #include "chrome/browser/sessions/session_id.h" |
| 20 #include "googleurl/src/gurl.h" | 20 #include "googleurl/src/gurl.h" |
| 21 #include "googleurl/src/url_parse.h" | 21 #include "googleurl/src/url_parse.h" |
| 22 | 22 |
| 23 // TODO(msw): Update with comment explaining experiments??? |
| 23 // The AutocompleteController is the center of the autocomplete system. A | 24 // The AutocompleteController is the center of the autocomplete system. A |
| 24 // class creates an instance of the controller, which in turn creates a set of | 25 // class creates an instance of the controller, which in turn creates a set of |
| 25 // AutocompleteProviders to serve it. The owning class can ask the controller | 26 // AutocompleteProviders to serve it. The owning class can ask the controller |
| 26 // to Start() a query; the controller in turn passes this call down to the | 27 // to Start() a query; the controller in turn passes this call down to the |
| 27 // providers, each of which keeps track of its own matches and whether it has | 28 // providers, each of which keeps track of its own matches and whether it has |
| 28 // finished processing the query. When a provider gets more matches or finishes | 29 // finished processing the query. When a provider gets more matches or finishes |
| 29 // processing, it notifies the controller, which merges the combined matches | 30 // processing, it notifies the controller, which merges the combined matches |
| 30 // together and makes the result available to interested observers. | 31 // together and makes the result available to interested observers. |
| 31 // | 32 // |
| 32 // The owner may also cancel the current query by calling Stop(), which the | 33 // The owner may also cancel the current query by calling Stop(), which the |
| (...skipping 764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 797 // the time the user began typing (this should only happen in | 798 // the time the user began typing (this should only happen in |
| 798 // unit tests), this elapsed time is set to -1 milliseconds. | 799 // unit tests), this elapsed time is set to -1 milliseconds. |
| 799 base::TimeDelta elapsed_time_since_user_first_modified_omnibox; | 800 base::TimeDelta elapsed_time_since_user_first_modified_omnibox; |
| 800 // Inline autocompleted length (if displayed). | 801 // Inline autocompleted length (if displayed). |
| 801 size_t inline_autocompleted_length; | 802 size_t inline_autocompleted_length; |
| 802 // Result set. | 803 // Result set. |
| 803 const AutocompleteResult& result; | 804 const AutocompleteResult& result; |
| 804 }; | 805 }; |
| 805 | 806 |
| 806 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_H_ | 807 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_H_ |
| OLD | NEW |