summaryrefslogtreecommitdiffstats
path: root/chrome/renderer
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-02 20:47:06 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-02 20:47:06 +0000
commitea8c745aa6a3be27b904060832fdf14bb11193bf (patch)
tree32ba371b6f4d59b7e8bcc987a2912aa645ba73a0 /chrome/renderer
parentac8e3525fa24068878ef8a45f35aba681f852cc9 (diff)
downloadchromium_src-ea8c745aa6a3be27b904060832fdf14bb11193bf.zip
chromium_src-ea8c745aa6a3be27b904060832fdf14bb11193bf.tar.gz
chromium_src-ea8c745aa6a3be27b904060832fdf14bb11193bf.tar.bz2
Paste from the x clipboard into webkit.
Review URL: http://codereview.chromium.org/51008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13031 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer')
-rw-r--r--chrome/renderer/render_view.cc9
-rw-r--r--chrome/renderer/render_view.h3
2 files changed, 12 insertions, 0 deletions
diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc
index d2c052c..1011647 100644
--- a/chrome/renderer/render_view.cc
+++ b/chrome/renderer/render_view.cc
@@ -358,6 +358,7 @@ void RenderView::OnMessageReceived(const IPC::Message& message) {
IPC_MESSAGE_HANDLER(ViewMsg_CopyImageAt, OnCopyImageAt)
IPC_MESSAGE_HANDLER(ViewMsg_Find, OnFind)
IPC_MESSAGE_HANDLER(ViewMsg_Zoom, OnZoom)
+ IPC_MESSAGE_HANDLER(ViewMsg_InsertText, OnInsertText)
IPC_MESSAGE_HANDLER(ViewMsg_SetPageEncoding, OnSetPageEncoding)
IPC_MESSAGE_HANDLER(ViewMsg_InspectElement, OnInspectElement)
IPC_MESSAGE_HANDLER(ViewMsg_ShowJavaScriptConsole, OnShowJavaScriptConsole)
@@ -2362,6 +2363,10 @@ void RenderView::OnZoom(int function) {
}
}
+void RenderView::OnInsertText(const string16& text) {
+ webview()->InsertText(text);
+}
+
void RenderView::OnSetPageEncoding(const std::wstring& encoding_name) {
webview()->SetPageEncoding(encoding_name);
}
@@ -2425,6 +2430,10 @@ WebDevToolsAgentDelegate* RenderView::GetWebDevToolsAgentDelegate() {
return devtools_agent_;
}
+void RenderView::PasteFromSelectionClipboard() {
+ Send(new ViewHostMsg_PasteFromSelectionClipboard(routing_id_));
+}
+
WebFrame* RenderView::GetChildFrame(const std::wstring& frame_xpath) const {
WebFrame* web_frame;
if (frame_xpath.empty()) {
diff --git a/chrome/renderer/render_view.h b/chrome/renderer/render_view.h
index d6bf327..7f20d60 100644
--- a/chrome/renderer/render_view.h
+++ b/chrome/renderer/render_view.h
@@ -285,6 +285,8 @@ class RenderView : public RenderWidget,
virtual WebDevToolsAgentDelegate* GetWebDevToolsAgentDelegate();
+ virtual void PasteFromSelectionClipboard();
+
virtual void OnPasswordFormsSeen(WebView* webview,
const std::vector<PasswordForm>& forms);
@@ -487,6 +489,7 @@ class RenderView : public RenderWidget,
void OnCancelDownload(int32 download_id);
void OnFind(const WebKit::WebFindInPageRequest& request);
void OnZoom(int function);
+ void OnInsertText(const string16& text);
void OnSetPageEncoding(const std::wstring& encoding_name);
void OnGetAllSavableResourceLinksForCurrentPage(const GURL& page_url);
void OnGetSerializedHtmlDataForCurrentPageWithLocalLinks(