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

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

Issue 12771013: Instant: Make clicks on Most Visited items work. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cancel Created 7 years, 9 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
« no previous file with comments | « no previous file | chrome/renderer/resources/extensions/searchbox_api.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/instant/instant_controller.cc
diff --git a/chrome/browser/instant/instant_controller.cc b/chrome/browser/instant/instant_controller.cc
index ff58a6cadc23b1a2ee84a390a024f97265cacedc..7ac598a19bf49de2134705386d83bd71a84e4001 100644
--- a/chrome/browser/instant/instant_controller.cc
+++ b/chrome/browser/instant/instant_controller.cc
@@ -608,10 +608,13 @@ bool InstantController::CommitIfPossible(InstantCommitType type) {
if (overlay_->IsUsingLocalOverlay())
return false;
- if (type == INSTANT_COMMIT_FOCUS_LOST)
- overlay_->Cancel(last_omnibox_text_);
- else if (type != INSTANT_COMMIT_NAVIGATED)
+ if (type == INSTANT_COMMIT_FOCUS_LOST) {
+ // Extended mode doesn't need or use the Cancel message.
+ if (!extended_enabled_)
+ overlay_->Cancel(last_omnibox_text_);
+ } else if (type != INSTANT_COMMIT_NAVIGATED) {
overlay_->Submit(last_omnibox_text_);
+ }
scoped_ptr<content::WebContents> overlay = overlay_->ReleaseContents();
« no previous file with comments | « no previous file | chrome/renderer/resources/extensions/searchbox_api.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698