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

Unified Diff: apps/app_window_contents.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
« no previous file with comments | « no previous file | apps/shell_window.cc » ('j') | content/browser/android/content_view_core_impl.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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).
« no previous file with comments | « no previous file | apps/shell_window.cc » ('j') | content/browser/android/content_view_core_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698