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

Side by Side Diff: chrome/browser/instant/instant_controller.h

Issue 11889003: Fixing ESC in instant-extended. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added issue number to TODO. Created 7 years, 10 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_INSTANT_INSTANT_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_
6 #define CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_ 6 #define CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_
7 7
8 #include <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 104
105 // Send autocomplete results from |providers| to the preview page. 105 // Send autocomplete results from |providers| to the preview page.
106 void HandleAutocompleteResults( 106 void HandleAutocompleteResults(
107 const std::vector<AutocompleteProvider*>& providers); 107 const std::vector<AutocompleteProvider*>& providers);
108 108
109 // Called when the user presses up or down. |count| is a repeat count, 109 // Called when the user presses up or down. |count| is a repeat count,
110 // negative for moving up, positive for moving down. Returns true if Instant 110 // negative for moving up, positive for moving down. Returns true if Instant
111 // handled the key press. 111 // handled the key press.
112 bool OnUpOrDownKeyPressed(int count); 112 bool OnUpOrDownKeyPressed(int count);
113 113
114 // Called when the user has arrowed into the suggestions but wants to cancel,
115 // typically by pressing ESC. The omnibox text is expected to have been
116 // reverted to |full_text| by the OmniboxEditModel prior to calling this.
117 // |match| is the match reverted to.
118 void OnCancel(const AutocompleteMatch& match,
119 const string16& full_text);
120
114 // The preview WebContents. May be NULL. InstantController retains ownership. 121 // The preview WebContents. May be NULL. InstantController retains ownership.
115 content::WebContents* GetPreviewContents() const; 122 content::WebContents* GetPreviewContents() const;
116 123
117 // Returns true if the Instant preview is showing a search results preview. 124 // Returns true if the Instant preview is showing a search results preview.
118 bool IsPreviewingSearchResults() const; 125 bool IsPreviewingSearchResults() const;
119 126
120 // If the preview is showing search results, commits the preview, calling 127 // If the preview is showing search results, commits the preview, calling
121 // CommitInstant() on the browser, and returns true. Else, returns false. 128 // CommitInstant() on the browser, and returns true. Else, returns false.
122 bool CommitIfPossible(InstantCommitType type); 129 bool CommitIfPossible(InstantCommitType type);
123 130
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 // MODE_SEARCH_SUGGESTIONS, except in those cases where this is false. 395 // MODE_SEARCH_SUGGESTIONS, except in those cases where this is false.
389 bool allow_preview_to_show_search_suggestions_; 396 bool allow_preview_to_show_search_suggestions_;
390 397
391 // List of events and their timestamps, useful in debugging Instant behaviour. 398 // List of events and their timestamps, useful in debugging Instant behaviour.
392 mutable std::list<std::pair<int64, std::string> > debug_events_; 399 mutable std::list<std::pair<int64, std::string> > debug_events_;
393 400
394 DISALLOW_COPY_AND_ASSIGN(InstantController); 401 DISALLOW_COPY_AND_ASSIGN(InstantController);
395 }; 402 };
396 403
397 #endif // CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_ 404 #endif // CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/instant/instant_controller.cc » ('j') | chrome/browser/instant/instant_controller.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698