Index: apps/app_window_contents.cc |
diff --git a/apps/app_window_contents.cc b/apps/app_window_contents.cc |
index d163c2ce84ace7bce1cdb270d9412ce4e87b2d98..0517f046c012c99ba4b6868e59dfc208ccf1ba91 100644 |
--- a/apps/app_window_contents.cc |
+++ b/apps/app_window_contents.cc |
@@ -60,16 +60,15 @@ void AppWindowContents::LoadContents(int32 creator_process_id) { |
} |
// TODO(jeremya): there's a bug where navigating a web contents to an |
- // extension URL causes it to create a new RVH and discard the old |
- // (perfectly usable) one. To work around this, we watch for a RVH_CHANGED |
- // message from the web contents (which will be sent during LoadURL) and |
- // suspend resource requests on the new RVH to ensure that we block the new |
- // RVH from loading anything. It should be okay to remove the |
- // NOTIFICATION_RVH_CHANGED registration once http://crbug.com/123007 is |
- // fixed. |
- registrar_.Add(this, content::NOTIFICATION_RENDER_VIEW_HOST_CHANGED, |
- content::Source<content::NavigationController>( |
- &web_contents()->GetController())); |
+ // extension URL causes it to create a new RVH and discard the old (perfectly |
+ // usable) one. To work around this, we watch for a |
+ // NOTIFICATION_WEB_CONTENTS_SWAPPED message from the web contents (which will |
+ // be sent during LoadURL) and suspend resource requests on the new RVH to |
+ // ensure that we block the new RVH from loading anything. It should be okay |
+ // to remove the NOTIFICATION_WEB_CONTENTS_SWAPPED registration once |
+ // http://crbug.com/123007 is fixed. |
+ registrar_.Add(this, content::NOTIFICATION_WEB_CONTENTS_SWAPPED, |
+ content::Source<content::WebContents>(web_contents())); |
web_contents_->GetController().LoadURL( |
url_, content::Referrer(), content::PAGE_TRANSITION_LINK, |
std::string()); |
@@ -117,7 +116,7 @@ void AppWindowContents::Observe( |
const content::NotificationSource& source, |
const content::NotificationDetails& details) { |
switch (type) { |
- case content::NOTIFICATION_RENDER_VIEW_HOST_CHANGED: { |
+ case content::NOTIFICATION_WEB_CONTENTS_SWAPPED: { |
// TODO(jeremya): once http://crbug.com/123007 is fixed, we'll no longer |
// need to suspend resource requests here (the call in the constructor |
// should be enough). |