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

Unified Diff: chrome/browser/ui/search/instant_page.h

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: Nits Created 7 years, 4 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 | « chrome/browser/ui/search/instant_ntp_prerenderer.cc ('k') | chrome/browser/ui/search/instant_page.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/search/instant_page.h
diff --git a/chrome/browser/ui/search/instant_page.h b/chrome/browser/ui/search/instant_page.h
index 926ad5e7e61e9a4911bd591e8658e33bb2f92d77..1cb5dfea600cd3152fdc1aea09a860fbdc864235 100644
--- a/chrome/browser/ui/search/instant_page.h
+++ b/chrome/browser/ui/search/instant_page.h
@@ -72,6 +72,11 @@ class InstantPage : public content::WebContentsObserver,
WindowOpenDisposition disposition,
bool is_search_type) = 0;
+ // Called when the page wants to paste the |text| (or the clipboard content
+ // if the |text| is empty) into the omnibox.
+ virtual void PasteIntoOmnibox(const content::WebContents* contents,
+ const string16& text) = 0;
+
// Called when the SearchBox wants to delete a Most Visited item.
virtual void DeleteMostVisitedItem(const GURL& url) = 0;
@@ -133,6 +138,7 @@ class InstantPage : public content::WebContentsObserver,
virtual bool ShouldProcessAboutToNavigateMainFrame();
virtual bool ShouldProcessFocusOmnibox();
virtual bool ShouldProcessNavigateToURL();
+ virtual bool ShouldProcessPasteIntoOmnibox();
virtual bool ShouldProcessDeleteMostVisitedItem();
virtual bool ShouldProcessUndoMostVisitedDeletion();
virtual bool ShouldProcessUndoAllMostVisitedDeletions();
@@ -188,6 +194,7 @@ class InstantPage : public content::WebContentsObserver,
content::PageTransition transition,
WindowOpenDisposition disposition,
bool is_search_type);
+ void OnSearchBoxPaste(int page_id, const string16& text);
void OnCountMouseover(int page_id);
void OnDeleteMostVisitedItem(int page_id, const GURL& url);
void OnUndoMostVisitedDeletion(int page_id, const GURL& url);
« no previous file with comments | « chrome/browser/ui/search/instant_ntp_prerenderer.cc ('k') | chrome/browser/ui/search/instant_page.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698