OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
541 virtual ~AutocompleteProvider(); | 541 virtual ~AutocompleteProvider(); |
542 | 542 |
543 // Trims "http:" and up to two subsequent slashes from |url|. Returns the | 543 // Trims "http:" and up to two subsequent slashes from |url|. Returns the |
544 // number of characters that were trimmed. | 544 // number of characters that were trimmed. |
545 static size_t TrimHttpPrefix(std::wstring* url); | 545 static size_t TrimHttpPrefix(std::wstring* url); |
546 | 546 |
547 // Updates the starred state of each of the matches in matches_ from the | 547 // Updates the starred state of each of the matches in matches_ from the |
548 // profile's bookmark bar model. | 548 // profile's bookmark bar model. |
549 void UpdateStarredStateOfMatches(); | 549 void UpdateStarredStateOfMatches(); |
550 | 550 |
551 // A convenience function to call gfx::GetCleanStringFromUrl() with the | 551 // A convenience function to call net::FormatUrl() with the current set of |
552 // current set of "Accept Languages" when check_accept_lang is true. | 552 // "Accept Languages" when check_accept_lang is true. Otherwise, it's called |
553 // Otherwise, it's called with an empty list. | 553 // with an empty list. |
554 std::wstring StringForURLDisplay(const GURL& url, | 554 std::wstring StringForURLDisplay(const GURL& url, |
555 bool check_accept_lang) const; | 555 bool check_accept_lang) const; |
556 | 556 |
557 // The profile associated with the AutocompleteProvider. Reference is not | 557 // The profile associated with the AutocompleteProvider. Reference is not |
558 // owned by us. | 558 // owned by us. |
559 Profile* profile_; | 559 Profile* profile_; |
560 | 560 |
561 ACProviderListener* listener_; | 561 ACProviderListener* listener_; |
562 ACMatches matches_; | 562 ACMatches matches_; |
563 bool done_; | 563 bool done_; |
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
880 AutocompleteInput::Type input_type; | 880 AutocompleteInput::Type input_type; |
881 // Selected index (if selected) or -1 (AutocompletePopupModel::kNoMatch). | 881 // Selected index (if selected) or -1 (AutocompletePopupModel::kNoMatch). |
882 size_t selected_index; | 882 size_t selected_index; |
883 // Inline autocompleted length (if displayed). | 883 // Inline autocompleted length (if displayed). |
884 size_t inline_autocompleted_length; | 884 size_t inline_autocompleted_length; |
885 // Result set. | 885 // Result set. |
886 const AutocompleteResult& result; | 886 const AutocompleteResult& result; |
887 }; | 887 }; |
888 | 888 |
889 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_H_ | 889 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_H_ |
OLD | NEW |