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

Side by Side Diff: chrome/browser/ui/omnibox/omnibox_edit_model.h

Issue 13141002: Use Instant suggested match type for Instant temporary text. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: TODO Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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_UI_OMNIBOX_OMNIBOX_EDIT_MODEL_H_ 5 #ifndef CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_MODEL_H_
6 #define CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_MODEL_H_ 6 #define CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_MODEL_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 // which is the URL of the current page. 500 // which is the URL of the current page.
501 // 501 //
502 // original_url_ is only valid when there is temporary text, and is used as 502 // original_url_ is only valid when there is temporary text, and is used as
503 // the unique identifier of the originally selected item. Thus, if the user 503 // the unique identifier of the originally selected item. Thus, if the user
504 // arrows to a different item with the same text, we can still distinguish 504 // arrows to a different item with the same text, we can still distinguish
505 // them and not revert all the way to the permanent_text_. 505 // them and not revert all the way to the permanent_text_.
506 bool has_temporary_text_; 506 bool has_temporary_text_;
507 GURL original_url_; 507 GURL original_url_;
508 508
509 // True if Instant set the current temporary text, as opposed to it being set 509 // True if Instant set the current temporary text, as opposed to it being set
510 // due to the user arrowing up/down through the popup. 510 // due to the user arrowing up/down through the popup. This can only be true
511 // if |has_temporary_text_| is true.
511 // TODO(sreeram): This is a temporary hack. Remove it once the omnibox edit 512 // TODO(sreeram): This is a temporary hack. Remove it once the omnibox edit
512 // model/view code is decoupled from Instant (among other things). 513 // model/view code is decoupled from Instant (among other things).
513 bool is_temporary_text_set_by_instant_; 514 bool is_temporary_text_set_by_instant_;
514 515
516 // True if the current temporary text set by Instant is a search query; false
517 // if it is a URL that can be directly navigated to. This is only valid if
518 // |is_temporary_text_set_by_instant_| is true. This field is needed because
519 // Instant's temporary text doesn't come from the popup model, so we can't
520 // lookup its type from the current match.
521 bool is_instant_temporary_text_a_search_query_;
Peter Kasting 2013/04/08 20:13:50 We now have several bools about what the text in t
sreeram 2013/04/08 20:20:48 Can I punt on this? @beaudoin's refactor should ta
Peter Kasting 2013/04/08 20:34:06 Sure.
522
515 // When the user's last action was to paste, we disallow inline autocomplete 523 // When the user's last action was to paste, we disallow inline autocomplete
516 // (on the theory that the user is trying to paste in a new URL or part of 524 // (on the theory that the user is trying to paste in a new URL or part of
517 // one, and in either case inline autocomplete would get in the way). 525 // one, and in either case inline autocomplete would get in the way).
518 PasteState paste_state_; 526 PasteState paste_state_;
519 527
520 // Whether the control key is depressed. We track this to avoid calling 528 // Whether the control key is depressed. We track this to avoid calling
521 // UpdatePopup() repeatedly if the user holds down the key, and to know 529 // UpdatePopup() repeatedly if the user holds down the key, and to know
522 // whether to trigger "ctrl-enter" behavior. 530 // whether to trigger "ctrl-enter" behavior.
523 ControlKeyState control_key_state_; 531 ControlKeyState control_key_state_;
524 532
(...skipping 24 matching lines...) Expand all
549 // an exact keyword match. If this is true then keyword mode will be 557 // an exact keyword match. If this is true then keyword mode will be
550 // triggered automatically if the input is "<keyword> <search string>". We 558 // triggered automatically if the input is "<keyword> <search string>". We
551 // allow this when CreatedKeywordSearchByInsertingSpaceInMiddle() is true. 559 // allow this when CreatedKeywordSearchByInsertingSpaceInMiddle() is true.
552 // This has no effect if we're already in keyword mode. 560 // This has no effect if we're already in keyword mode.
553 bool allow_exact_keyword_match_; 561 bool allow_exact_keyword_match_;
554 562
555 DISALLOW_COPY_AND_ASSIGN(OmniboxEditModel); 563 DISALLOW_COPY_AND_ASSIGN(OmniboxEditModel);
556 }; 564 };
557 565
558 #endif // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_MODEL_H_ 566 #endif // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_MODEL_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/omnibox/omnibox_edit_model.cc » ('j') | chrome/browser/ui/omnibox/omnibox_edit_model.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698