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

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

Issue 23618036: Merge NOTIFICATION_RENDER_VIEW_HOST_CHANGED into NOTIFICATION_WEB_CONTENTS_SWAPPED. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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
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
- }
- }
}
}
« no previous file with comments | « chrome/browser/extensions/extension_process_manager.cc ('k') | content/browser/web_contents/render_view_host_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698