summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authoravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-03 00:57:28 +0000
committeravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-03 00:57:28 +0000
commit7b712ee2b7375ceb1b99913749623cd3dd2b664c (patch)
treeb360fc19a0aed3d6f7022847ed5b6b981b7b4b21 /apps
parent6369bda963cc9c5a12f29f36ece63943bad19191 (diff)
downloadchromium_src-7b712ee2b7375ceb1b99913749623cd3dd2b664c.zip
chromium_src-7b712ee2b7375ceb1b99913749623cd3dd2b664c.tar.gz
chromium_src-7b712ee2b7375ceb1b99913749623cd3dd2b664c.tar.bz2
Merge NOTIFICATION_WEB_CONTENTS_SWAPPED into NOTIFICATION_RENDER_VIEW_HOST_CHANGED.
NOTIFICATION_WEB_CONTENTS_SWAPPED was fired in a strict subset of times that NOTIFICATION_RENDER_VIEW_HOST_CHANGED was fired, but everyone was listening for NOTIFICATION_WEB_CONTENTS_SWAPPED since it showed up in the types file first. BUG=170921,123007 TEST=no functional change Review URL: https://codereview.chromium.org/23618036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@226637 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'apps')
-rw-r--r--apps/app_window_contents.cc17
-rw-r--r--apps/native_app_window.h4
-rw-r--r--apps/shell_window.cc10
3 files changed, 8 insertions, 23 deletions
diff --git a/apps/app_window_contents.cc b/apps/app_window_contents.cc
index 7b88e67..56ae403 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.
+ // 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_RENDER_VIEW_HOST_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_RENDER_VIEW_HOST_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()));
+ content::Source<content::WebContents>(web_contents()));
web_contents_->GetController().LoadURL(
url_, content::Referrer(), content::PAGE_TRANSITION_LINK,
std::string());
diff --git a/apps/native_app_window.h b/apps/native_app_window.h
index 9a1e05b..b0a6b17 100644
--- a/apps/native_app_window.h
+++ b/apps/native_app_window.h
@@ -43,10 +43,6 @@ class NativeAppWindow : public ui::BaseWindow,
virtual void HandleKeyboardEvent(
const content::NativeWebKeyboardEvent& event) = 0;
- // TODO(jianli): once http://crbug.com/123007 is fixed, we'll no longer need
- // this.
- virtual void RenderViewHostChanged() = 0;
-
// Returns the difference between the window bounds (including titlebar and
// borders) and the content bounds, if any.
virtual gfx::Insets GetFrameInsets() const = 0;
diff --git a/apps/shell_window.cc b/apps/shell_window.cc
index 4317883..99c330c 100644
--- a/apps/shell_window.cc
+++ b/apps/shell_window.cc
@@ -183,9 +183,6 @@ void ShellWindow::Init(const GURL& url,
// about it in case it has any setup to do to make the renderer appear
// properly. In particular, on Windows, the view's clickthrough region needs
// to be set.
- registrar_.Add(this, content::NOTIFICATION_RENDER_VIEW_HOST_CHANGED,
- content::Source<content::NavigationController>(
- &web_contents->GetController()));
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED,
content::Source<Profile>(profile_));
// Close when the browser process is exiting.
@@ -543,13 +540,6 @@ void ShellWindow::Observe(int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) {
switch (type) {
- case content::NOTIFICATION_RENDER_VIEW_HOST_CHANGED: {
- // TODO(jianli): once http://crbug.com/123007 is fixed, we'll no longer
- // need to make the native window (ShellWindowViews specially) update
- // the clickthrough region for the new RVH.
- native_app_window_->RenderViewHostChanged();
- break;
- }
case chrome::NOTIFICATION_EXTENSION_UNLOADED: {
const extensions::Extension* unloaded_extension =
content::Details<extensions::UnloadedExtensionInfo>(