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

Unified Diff: content/browser/android/content_view_core_impl.cc

Issue 14129003: Fix the incorrect native ImeAdapter attach and detach. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fix nits Created 7 years, 8 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 | « no previous file | content/browser/renderer_host/ime_adapter_android.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/android/content_view_core_impl.cc
diff --git a/content/browser/android/content_view_core_impl.cc b/content/browser/android/content_view_core_impl.cc
index 204145c773647024dade3629fe31daaf9bc4fbd1..c55e6323d407f1155be15b20416c2bcec20abd49 100644
--- a/content/browser/android/content_view_core_impl.cc
+++ b/content/browser/android/content_view_core_impl.cc
@@ -219,6 +219,9 @@ void ContentViewCoreImpl::InitWebContents() {
notification_registrar_.Add(
this, NOTIFICATION_WEB_CONTENTS_CONNECTED,
Source<WebContents>(web_contents_));
+ notification_registrar_.Add(
+ this, NOTIFICATION_WEB_CONTENTS_SWAPPED,
+ Source<WebContents>(web_contents_));
static_cast<WebContentsViewAndroid*>(web_contents_->GetView())->
SetContentViewCore(this);
@@ -278,6 +281,13 @@ void ContentViewCoreImpl::Observe(int type,
}
break;
}
+ case NOTIFICATION_WEB_CONTENTS_SWAPPED: {
+ JNIEnv* env = AttachCurrentThread();
+ ScopedJavaLocalRef<jobject> obj = java_ref_.get(env);
+ if (!obj.is_null()) {
+ Java_ContentViewCore_onWebContentsSwapped(env, obj.obj());
+ }
+ }
}
}
« no previous file with comments | « no previous file | content/browser/renderer_host/ime_adapter_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698