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

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

Issue 11369137: Implement {Start,Stop}CapturingKeyStrokes for Instant. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase. Created 8 years 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 f6c77257a3a0fc552bcbffa261dddca92df7700b..8182971768a8dea4e4312fcf6bc6dcd6ad9915a9 100644
--- a/chrome/browser/instant/instant_controller.cc
+++ b/chrome/browser/instant/instant_controller.cc
@@ -742,6 +742,14 @@ void InstantController::ShowInstantPreview(InstantShownReason reason,
ShowLoader(reason, height, units);
}
+void InstantController::StartCapturingKeyStrokes(
+ const content::WebContents* contents) {
+ // Ignore unless the loader is active and on the NTP.
+ if (extended_enabled_ && !instant_tab_ && loader_->contents() == contents &&
sreeram 2012/12/04 21:54:58 You can drop the "loader_->contents() == contents"
samarth 2012/12/04 22:13:43 Done.
+ model_.mode().is_ntp())
+ browser_->FocusOmniboxInvisibly();
+}
+
void InstantController::SwappedWebContents() {
model_.SetPreviewContents(GetPreviewContents());
}

Powered by Google App Engine
This is Rietveld 408576698