| Index: content/browser/renderer_host/ime_adapter_android.cc
|
| diff --git a/content/browser/renderer_host/ime_adapter_android.cc b/content/browser/renderer_host/ime_adapter_android.cc
|
| index ac820f5765c3a7bf214293e8271e7bba7951f972..c0c16ed96ddb5881225b82af30535c71882aac43 100644
|
| --- a/content/browser/renderer_host/ime_adapter_android.cc
|
| +++ b/content/browser/renderer_host/ime_adapter_android.cc
|
| @@ -18,6 +18,7 @@
|
| #include "content/browser/frame_host/render_frame_host_impl.h"
|
| #include "content/browser/renderer_host/render_view_host_delegate.h"
|
| #include "content/browser/renderer_host/render_view_host_impl.h"
|
| +#include "content/browser/renderer_host/render_widget_host_delegate.h"
|
| #include "content/browser/renderer_host/render_widget_host_impl.h"
|
| #include "content/browser/renderer_host/render_widget_host_view_android.h"
|
| #include "content/common/frame_messages.h"
|
| @@ -282,21 +283,24 @@ void ImeAdapterAndroid::SelectAll(JNIEnv* env, jobject) {
|
| }
|
|
|
| void ImeAdapterAndroid::Cut(JNIEnv* env, jobject) {
|
| - WebContents* wc = GetWebContents();
|
| - if (wc)
|
| - wc->Cut();
|
| + RenderWidgetHostImpl* rwh = GetRenderWidgetHostImpl();
|
| + RenderWidgetHostDelegate* delegate = rwh ? rwh->delegate() : nullptr;
|
| + if (delegate)
|
| + delegate->Cut();
|
| }
|
|
|
| void ImeAdapterAndroid::Copy(JNIEnv* env, jobject) {
|
| - WebContents* wc = GetWebContents();
|
| - if (wc)
|
| - wc->Copy();
|
| + RenderWidgetHostImpl* rwh = GetRenderWidgetHostImpl();
|
| + RenderWidgetHostDelegate* delegate = rwh ? rwh->delegate() : nullptr;
|
| + if (delegate)
|
| + delegate->Copy();
|
| }
|
|
|
| void ImeAdapterAndroid::Paste(JNIEnv* env, jobject) {
|
| - WebContents* wc = GetWebContents();
|
| - if (wc)
|
| - wc->Paste();
|
| + RenderWidgetHostImpl* rwh = GetRenderWidgetHostImpl();
|
| + RenderWidgetHostDelegate* delegate = rwh ? rwh->delegate() : nullptr;
|
| + if (delegate)
|
| + delegate->Paste();
|
| }
|
|
|
| void ImeAdapterAndroid::ResetImeAdapter(JNIEnv* env, jobject) {
|
|
|