Index: content/browser/web_contents/touch_editable_impl_aura.cc |
=================================================================== |
--- content/browser/web_contents/touch_editable_impl_aura.cc (revision 255719) |
+++ content/browser/web_contents/touch_editable_impl_aura.cc (working copy) |
@@ -7,7 +7,10 @@ |
#include "content/browser/renderer_host/render_widget_host_impl.h" |
#include "content/browser/renderer_host/render_widget_host_view_aura.h" |
#include "content/common/view_messages.h" |
+#include "content/public/browser/render_frame_host.h" |
+#include "content/public/browser/render_view_host.h" |
#include "content/public/browser/render_widget_host.h" |
+#include "content/public/browser/web_contents.h" |
#include "grit/ui_strings.h" |
#include "ui/aura/client/activation_client.h" |
#include "ui/aura/client/screen_position_client.h" |
@@ -334,15 +337,18 @@ |
if (!rwhva_) |
return; |
RenderWidgetHost* host = rwhva_->GetRenderWidgetHost(); |
+ RenderViewHost* rvh = RenderViewHost::From(host); |
+ WebContents* wc = WebContents::FromRenderViewHost(rvh); |
+ RenderFrameHost* focused_frame = wc->GetFocusedFrame(); |
switch (command_id) { |
case IDS_APP_CUT: |
- host->Cut(); |
+ focused_frame->Cut(); |
break; |
case IDS_APP_COPY: |
- host->Copy(); |
+ focused_frame->Copy(); |
break; |
case IDS_APP_PASTE: |
- host->Paste(); |
+ focused_frame->Paste(); |
break; |
case IDS_APP_DELETE: |
host->Delete(); |