Upstream version 9.37.197.0
[platform/framework/web/crosswalk.git] / src / content / renderer / render_view_impl_android.cc
index 18f41a2..57d1920 100644 (file)
@@ -7,7 +7,9 @@
 #include "base/command_line.h"
 #include "base/message_loop/message_loop.h"
 #include "cc/trees/layer_tree_host.h"
+#include "content/common/view_messages.h"
 #include "content/renderer/gpu/render_widget_compositor.h"
+#include "third_party/WebKit/public/web/WebView.h"
 
 namespace content {
 
@@ -51,7 +53,7 @@ void RenderViewImpl::UpdateTopControlsState(TopControlsState constraints,
   top_controls_constraints_ = constraints_cc;
 }
 
-void RenderViewImpl::didScrollWithKeyboard(const WebKit::WebSize& delta) {
+void RenderViewImpl::didScrollWithKeyboard(const blink::WebSize& delta) {
   if (delta.height == 0)
     return;
   if (compositor_) {
@@ -62,4 +64,13 @@ void RenderViewImpl::didScrollWithKeyboard(const WebKit::WebSize& delta) {
   }
 }
 
+void RenderViewImpl::OnExtractSmartClipData(const gfx::Rect& rect) {
+  blink::WebString clip_text;
+  blink::WebString clip_html;
+  blink::WebRect clip_rect;
+  webview()->extractSmartClipData(rect, clip_text, clip_html, clip_rect);
+  Send(new ViewHostMsg_SmartClipDataExtracted(
+      routing_id_, clip_text, clip_html, clip_rect));
+}
+
 }  // namespace content