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 e5600d3582b5dc1747d5d9a07f626b175bd504db..fd9d8b9af7b0ee5898e84fdefcd8a5e7508fedeb 100644 |
--- a/content/browser/android/content_view_core_impl.cc |
+++ b/content/browser/android/content_view_core_impl.cc |
@@ -218,8 +218,8 @@ void ContentViewCoreImpl::OnJavaContentViewCoreDestroyed(JNIEnv* env, |
void ContentViewCoreImpl::InitWebContents() { |
DCHECK(web_contents_); |
notification_registrar_.Add( |
- this, NOTIFICATION_RENDER_VIEW_HOST_CHANGED, |
- Source<NavigationController>(&web_contents_->GetController())); |
+ this, NOTIFICATION_WEB_CONTENTS_SWAPPED, |
+ Source<WebContents>(web_contents_)); |
joth
2013/09/06 21:33:25
you're registering this twice now
Avi (use Gerrit)
2013/09/06 21:39:07
Yep; fixed.
|
notification_registrar_.Add( |
this, NOTIFICATION_RENDERER_PROCESS_CREATED, |
content::NotificationService::AllBrowserContextsAndSources()); |
@@ -241,7 +241,7 @@ void ContentViewCoreImpl::Observe(int type, |
const NotificationSource& source, |
const NotificationDetails& details) { |
switch (type) { |
- case NOTIFICATION_RENDER_VIEW_HOST_CHANGED: { |
+ case NOTIFICATION_WEB_CONTENTS_SWAPPED: { |
std::pair<RenderViewHost*, RenderViewHost*>* switched_details = |
Details<std::pair<RenderViewHost*, RenderViewHost*> >(details).ptr(); |
int old_pid = 0; |
@@ -288,13 +288,6 @@ 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()); |
joth
2013/09/06 21:33:25
onWebContentsSwapped would never be called after t
Avi (use Gerrit)
2013/09/06 21:39:07
Note that onWebContentsSwapped was never called wi
|
- } |
- } |
} |
} |