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

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

Issue 10918289: Instant extended API: Make arrow up/down work. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Hackiness noted Created 8 years, 3 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 (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_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 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 // and the popup is closed and "goog" is replaced by the permanent_text_, 459 // and the popup is closed and "goog" is replaced by the permanent_text_,
460 // which is the URL of the current page. 460 // which is the URL of the current page.
461 // 461 //
462 // original_url_ is only valid when there is temporary text, and is used as 462 // original_url_ is only valid when there is temporary text, and is used as
463 // the unique identifier of the originally selected item. Thus, if the user 463 // the unique identifier of the originally selected item. Thus, if the user
464 // arrows to a different item with the same text, we can still distinguish 464 // arrows to a different item with the same text, we can still distinguish
465 // them and not revert all the way to the permanent_text_. 465 // them and not revert all the way to the permanent_text_.
466 bool has_temporary_text_; 466 bool has_temporary_text_;
467 GURL original_url_; 467 GURL original_url_;
468 468
469 // True if Instant set the current temporary text, as opposed to it being set
470 // due to the user arrowing up/down through the popup.
471 // TODO(sreeram): This is a temporary hack. Remove it once the omnibox edit
472 // model/view code is decoupled from Instant (among other things).
473 bool is_temporary_text_set_by_instant_;
474
469 // When the user's last action was to paste, we disallow inline autocomplete 475 // When the user's last action was to paste, we disallow inline autocomplete
470 // (on the theory that the user is trying to paste in a new URL or part of 476 // (on the theory that the user is trying to paste in a new URL or part of
471 // one, and in either case inline autocomplete would get in the way). 477 // one, and in either case inline autocomplete would get in the way).
472 PasteState paste_state_; 478 PasteState paste_state_;
473 479
474 // Whether the control key is depressed. We track this to avoid calling 480 // Whether the control key is depressed. We track this to avoid calling
475 // UpdatePopup() repeatedly if the user holds down the key, and to know 481 // UpdatePopup() repeatedly if the user holds down the key, and to know
476 // whether to trigger "ctrl-enter" behavior. 482 // whether to trigger "ctrl-enter" behavior.
477 ControlKeyState control_key_state_; 483 ControlKeyState control_key_state_;
478 484
(...skipping 19 matching lines...) Expand all
498 // an exact keyword match. If this is true then keyword mode will be 504 // an exact keyword match. If this is true then keyword mode will be
499 // triggered automatically if the input is "<keyword> <search string>". We 505 // triggered automatically if the input is "<keyword> <search string>". We
500 // allow this when CreatedKeywordSearchByInsertingSpaceInMiddle() is true. 506 // allow this when CreatedKeywordSearchByInsertingSpaceInMiddle() is true.
501 // This has no effect if we're already in keyword mode. 507 // This has no effect if we're already in keyword mode.
502 bool allow_exact_keyword_match_; 508 bool allow_exact_keyword_match_;
503 509
504 DISALLOW_COPY_AND_ASSIGN(OmniboxEditModel); 510 DISALLOW_COPY_AND_ASSIGN(OmniboxEditModel);
505 }; 511 };
506 512
507 #endif // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_MODEL_H_ 513 #endif // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_MODEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698