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

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: Reverted back to asvitkine's fix. REALLY answered PK's comments. :) 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 selections but want to cancel,
sreeram 2013/02/12 18:12:29 selections -> suggestions want -> wants
beaudoin 2013/02/12 20:27:30 Done.
115 // typically by pressing ESC. The omnibox text is expected to have been
116 // reverted to |user_text| by Chrome prior to calling this.
sreeram 2013/02/12 18:12:29 Chrome -> the OmniboxEditModel
beaudoin 2013/02/12 20:27:30 Done.
117 bool OnCancel(string16 user_text);
sreeram 2013/02/12 18:12:29 const string16& The return value doesn't seem to b
beaudoin 2013/02/12 20:27:30 Done.
118
114 // The preview WebContents. May be NULL. InstantController retains ownership. 119 // The preview WebContents. May be NULL. InstantController retains ownership.
115 content::WebContents* GetPreviewContents() const; 120 content::WebContents* GetPreviewContents() const;
116 121
117 // Returns true if the Instant preview is showing a search results preview. 122 // Returns true if the Instant preview is showing a search results preview.
118 bool IsPreviewingSearchResults() const; 123 bool IsPreviewingSearchResults() const;
119 124
120 // If the preview is showing search results, commits the preview, calling 125 // If the preview is showing search results, commits the preview, calling
121 // CommitInstant() on the browser, and returns true. Else, returns false. 126 // CommitInstant() on the browser, and returns true. Else, returns false.
122 bool CommitIfPossible(InstantCommitType type); 127 bool CommitIfPossible(InstantCommitType type);
123 128
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 // MODE_SEARCH_SUGGESTIONS, except in those cases where this is false. 393 // MODE_SEARCH_SUGGESTIONS, except in those cases where this is false.
389 bool allow_preview_to_show_search_suggestions_; 394 bool allow_preview_to_show_search_suggestions_;
390 395
391 // List of events and their timestamps, useful in debugging Instant behaviour. 396 // List of events and their timestamps, useful in debugging Instant behaviour.
392 mutable std::list<std::pair<int64, std::string> > debug_events_; 397 mutable std::list<std::pair<int64, std::string> > debug_events_;
393 398
394 DISALLOW_COPY_AND_ASSIGN(InstantController); 399 DISALLOW_COPY_AND_ASSIGN(InstantController);
395 }; 400 };
396 401
397 #endif // CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_ 402 #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_page.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698