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

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

Issue 1072163003: Make GetInfoForCurrentText() return the correct match when we've selected an (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add comments Created 5 years, 8 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_MATCH_H_ 5 #ifndef COMPONENTS_OMNIBOX_AUTOCOMPLETE_MATCH_H_
6 #define COMPONENTS_OMNIBOX_AUTOCOMPLETE_MATCH_H_ 6 #define COMPONENTS_OMNIBOX_AUTOCOMPLETE_MATCH_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 // True when this match is the "what you typed" match from the history 333 // True when this match is the "what you typed" match from the history
334 // system. 334 // system.
335 bool is_history_what_you_typed_match; 335 bool is_history_what_you_typed_match;
336 336
337 // Type of this match. 337 // Type of this match.
338 Type type; 338 Type type;
339 339
340 // Set with a keyword provider match if this match can show a keyword hint. 340 // Set with a keyword provider match if this match can show a keyword hint.
341 // For example, if this is a SearchProvider match for "www.amazon.com", 341 // For example, if this is a SearchProvider match for "www.amazon.com",
342 // |associated_keyword| could be a KeywordProvider match for "amazon.com". 342 // |associated_keyword| could be a KeywordProvider match for "amazon.com".
343 //
344 // When this is set, the popup will show a ">" symbol at the right edge of the
345 // line for this match, and tab/shift-tab will toggle in and out of keyword
346 // mode without disturbing the rest of the popup. See also
347 // OmniboxPopupModel::SetSelectedLineState().
343 scoped_ptr<AutocompleteMatch> associated_keyword; 348 scoped_ptr<AutocompleteMatch> associated_keyword;
344 349
345 // The keyword of the TemplateURL the match originated from. This is nonempty 350 // The keyword of the TemplateURL the match originated from. This is nonempty
346 // for both explicit "keyword mode" matches as well as matches for the default 351 // for both explicit "keyword mode" matches as well as matches for the default
347 // search provider (so, any match for which we're doing substitution); it 352 // search provider (so, any match for which we're doing substitution); it
348 // doesn't imply (alone) that the UI is going to show a keyword hint or 353 // doesn't imply (alone) that the UI is going to show a keyword hint or
349 // keyword mode. For that, see GetKeywordUIState() or 354 // keyword mode. For that, see GetKeywordUIState() or
350 // GetSubstitutingExplicitlyInvokedKeyword(). 355 // GetSubstitutingExplicitlyInvokedKeyword().
351 // 356 //
352 // CAUTION: The TemplateURL associated with this keyword may be deleted or 357 // CAUTION: The TemplateURL associated with this keyword may be deleted or
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 const base::string16& text, 389 const base::string16& text,
385 const ACMatchClassifications& classifications) const; 390 const ACMatchClassifications& classifications) const;
386 #endif 391 #endif
387 }; 392 };
388 393
389 typedef AutocompleteMatch::ACMatchClassification ACMatchClassification; 394 typedef AutocompleteMatch::ACMatchClassification ACMatchClassification;
390 typedef std::vector<ACMatchClassification> ACMatchClassifications; 395 typedef std::vector<ACMatchClassification> ACMatchClassifications;
391 typedef std::vector<AutocompleteMatch> ACMatches; 396 typedef std::vector<AutocompleteMatch> ACMatches;
392 397
393 #endif // COMPONENTS_OMNIBOX_AUTOCOMPLETE_MATCH_H_ 398 #endif // COMPONENTS_OMNIBOX_AUTOCOMPLETE_MATCH_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698