Chromium Code Reviews| Index: content/renderer/render_view_impl_android.cc |
| diff --git a/content/renderer/render_view_impl_android.cc b/content/renderer/render_view_impl_android.cc |
| index 679da548f91dc2f487931c0658d3e1cddf60c8ed..7c8db08de52728a5807251cfe504364c0e8cdb43 100644 |
| --- a/content/renderer/render_view_impl_android.cc |
| +++ b/content/renderer/render_view_impl_android.cc |
| @@ -9,6 +9,7 @@ |
| #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/platform/WebRect.h" |
| #include "third_party/WebKit/public/web/WebView.h" |
| namespace content { |
| @@ -69,4 +70,23 @@ void RenderViewImpl::OnExtractSmartClipData(const gfx::Rect& rect) { |
| routing_id_, webview()->getSmartClipData(rect))); |
| } |
| +void RenderViewImpl::GetSelectionRootBounds(gfx::Rect* bounds) const { |
| + blink::WebRect bounds_webrect; |
| + webview()->getSelectionRootBounds(bounds_webrect); |
| + *bounds = bounds_webrect; |
| +} |
| + |
| +void RenderViewImpl::UpdateSelectionRootBounds() { |
| + if (!webview() || handling_ime_event_) { |
|
jochen (gone - plz use gerrit)
2014/03/12 13:01:00
nit. no { }
mlamouri (slow - plz ping)
2014/03/12 14:24:11
Done.
|
| + return; |
| + } |
| + |
| + gfx::Rect bounds; |
| + GetSelectionRootBounds(&bounds); |
| + if (selection_root_rect_ != bounds) { |
| + selection_root_rect_ = bounds; |
| + Send(new ViewHostMsg_SelectionRootBoundsChanged(routing_id_, bounds)); |
| + } |
| +} |
| + |
| } // namespace content |