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

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: Rebased 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
« no previous file with comments | « no previous file | chrome/browser/instant/instant_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 101
102 // Send autocomplete results from |providers| to the preview page. 102 // Send autocomplete results from |providers| to the preview page.
103 void HandleAutocompleteResults( 103 void HandleAutocompleteResults(
104 const std::vector<AutocompleteProvider*>& providers); 104 const std::vector<AutocompleteProvider*>& providers);
105 105
106 // Called when the user presses up or down. |count| is a repeat count, 106 // Called when the user presses up or down. |count| is a repeat count,
107 // negative for moving up, positive for moving down. Returns true if Instant 107 // negative for moving up, positive for moving down. Returns true if Instant
108 // handled the key press. 108 // handled the key press.
109 bool OnUpOrDownKeyPressed(int count); 109 bool OnUpOrDownKeyPressed(int count);
110 110
111 // Called when the user has arrowed into the suggestions but wants to cancel,
112 // typically by pressing ESC. The omnibox text is expected to have been
113 // reverted to |full_text| by the OmniboxEditModel prior to calling this.
114 // |match| is the match reverted to.
115 void OnCancel(const AutocompleteMatch& match,
116 const string16& full_text);
117
111 // The preview WebContents. May be NULL. InstantController retains ownership. 118 // The preview WebContents. May be NULL. InstantController retains ownership.
112 content::WebContents* GetPreviewContents() const; 119 content::WebContents* GetPreviewContents() const;
113 120
114 // Returns true if the Instant overlay is showing a search results preview. 121 // Returns true if the Instant overlay is showing a search results preview.
115 bool IsPreviewingSearchResults() const; 122 bool IsPreviewingSearchResults() const;
116 123
117 // If the preview is showing search results, commits the preview, calling 124 // If the preview is showing search results, commits the preview, calling
118 // CommitInstant() on the browser, and returns true. Else, returns false. 125 // CommitInstant() on the browser, and returns true. Else, returns false.
119 bool CommitIfPossible(InstantCommitType type); 126 bool CommitIfPossible(InstantCommitType type);
120 127
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 // MODE_SEARCH_SUGGESTIONS, except in those cases where this is false. 392 // MODE_SEARCH_SUGGESTIONS, except in those cases where this is false.
386 bool allow_preview_to_show_search_suggestions_; 393 bool allow_preview_to_show_search_suggestions_;
387 394
388 // List of events and their timestamps, useful in debugging Instant behaviour. 395 // List of events and their timestamps, useful in debugging Instant behaviour.
389 mutable std::list<std::pair<int64, std::string> > debug_events_; 396 mutable std::list<std::pair<int64, std::string> > debug_events_;
390 397
391 DISALLOW_COPY_AND_ASSIGN(InstantController); 398 DISALLOW_COPY_AND_ASSIGN(InstantController);
392 }; 399 };
393 400
394 #endif // CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_ 401 #endif // CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/instant/instant_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698