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

Unified Diff: chrome/browser/instant/instant_controller.cc

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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/instant/instant_controller.cc
diff --git a/chrome/browser/instant/instant_controller.cc b/chrome/browser/instant/instant_controller.cc
index 80f9b796a4cf181a57ac371c9af2bab3abe1c1df..ff5a9388da6d3d0c452713ec920f771df9e7191d 100644
--- a/chrome/browser/instant/instant_controller.cc
+++ b/chrome/browser/instant/instant_controller.cc
@@ -509,6 +509,21 @@ bool InstantController::OnUpOrDownKeyPressed(int count) {
return true;
}
+bool InstantController::OnCancel(string16 user_text) {
+ if (!extended_enabled_)
+ return false;
+
+ if (!instant_tab_ && !overlay_)
+ return false;
+
+ if (instant_tab_)
+ instant_tab_->CancelSelection(user_text);
+ else
+ overlay_->CancelSelection(user_text);
+
+ return true;
+}
+
content::WebContents* InstantController::GetPreviewContents() const {
return overlay_ ? overlay_->contents() : NULL;
}

Powered by Google App Engine
This is Rietveld 408576698