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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 2667283007: Refactor Samsung SmartClip implementation. (Closed)
Patch Set: Really apply code review comments Created 3 years, 10 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 | « content/renderer/render_frame_impl.h ('k') | content/renderer/render_view_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index f680dafd3d08e312a0c3974b5edbd53d4cc6f020..ac4c82cc29c156c52567c98fa68a89e533526f56 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -1563,6 +1563,7 @@ bool RenderFrameImpl::OnMessageReceived(const IPC::Message& msg) {
OnSetAccessibilityMode)
IPC_MESSAGE_HANDLER(AccessibilityMsg_SnapshotTree,
OnSnapshotAccessibilityTree)
+ IPC_MESSAGE_HANDLER(FrameMsg_ExtractSmartClipData, OnExtractSmartClipData)
IPC_MESSAGE_HANDLER(FrameMsg_UpdateOpener, OnUpdateOpener)
IPC_MESSAGE_HANDLER(FrameMsg_CommitNavigation, OnCommitNavigation)
IPC_MESSAGE_HANDLER(FrameMsg_DidUpdateSandboxFlags, OnDidUpdateSandboxFlags)
@@ -2141,6 +2142,15 @@ void RenderFrameImpl::OnSnapshotAccessibilityTree(int callback_id) {
routing_id_, callback_id, response));
}
+void RenderFrameImpl::OnExtractSmartClipData(uint32_t id,
+ const gfx::Rect& rect) {
+ blink::WebString clip_text;
+ blink::WebString clip_html;
+ GetWebFrame()->extractSmartClipData(rect, clip_text, clip_html);
+ Send(new FrameHostMsg_SmartClipDataExtracted(
+ routing_id_, id, clip_text.utf16(), clip_html.utf16()));
+}
+
void RenderFrameImpl::OnUpdateOpener(int opener_routing_id) {
WebFrame* opener = ResolveOpener(opener_routing_id);
frame_->setOpener(opener);
« no previous file with comments | « content/renderer/render_frame_impl.h ('k') | content/renderer/render_view_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698