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

Unified Diff: chrome/browser/ui/search/instant_controller.cc

Issue 20501002: Adds paste function to searchbox api and handles paste event on fakebox (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Test updated Created 7 years, 5 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/ui/search/instant_controller.cc
diff --git a/chrome/browser/ui/search/instant_controller.cc b/chrome/browser/ui/search/instant_controller.cc
index 28ce7fac1c3616fed381233b516181f582feb3a9..a86f9b661fa9c09c61e18276d3453078279e88ba 100644
--- a/chrome/browser/ui/search/instant_controller.cc
+++ b/chrome/browser/ui/search/instant_controller.cc
@@ -365,6 +365,15 @@ void InstantController::NavigateToURL(const content::WebContents* contents,
browser_->OpenURL(url, transition, disposition);
}
+void InstantController::PasteIntoOmnibox(const content::WebContents* contents) {
+ if (!extended_enabled() || search_mode_.is_origin_default())
+ return;
+
+ DCHECK(IsContentsFrom(instant_tab(), contents));
+
+ browser_->PasteIntoOmnibox();
+}
+
bool InstantController::extended_enabled() const {
return extended_enabled_;
}

Powered by Google App Engine
This is Rietveld 408576698