summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authorojan@google.com <ojan@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-12 17:42:02 +0000
committerojan@google.com <ojan@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-12 17:42:02 +0000
commit31663dd403b2e4b69a0ec411c377a8c8642cf7d8 (patch)
treeee7879c88a47909fa6438893d49ac913b267e86f /chrome/browser
parent6f848013f1f1ac6fdd0a1cbe0e038a54fb9c439c (diff)
downloadchromium_src-31663dd403b2e4b69a0ec411c377a8c8642cf7d8.zip
chromium_src-31663dd403b2e4b69a0ec411c377a8c8642cf7d8.tar.gz
chromium_src-31663dd403b2e4b69a0ec411c377a8c8642cf7d8.tar.bz2
Revert this CL. Breaks compile.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@724 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/browser.cc7
-rw-r--r--chrome/browser/web_contents.cc8
-rw-r--r--chrome/browser/web_contents.h11
3 files changed, 5 insertions, 21 deletions
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc
index b325d05..a2b7928 100644
--- a/chrome/browser/browser.cc
+++ b/chrome/browser/browser.cc
@@ -48,6 +48,7 @@
#include "chrome/browser/plugin_process_host.h"
#include "chrome/browser/plugin_service.h"
#include "chrome/browser/profile.h"
+#include "chrome/browser/render_view_host.h"
#include "chrome/browser/save_package.h"
#include "chrome/browser/ssl_error_info.h"
#include "chrome/browser/site_instance.h"
@@ -1079,9 +1080,11 @@ void Browser::ProcessPendingTabs() {
// Process beforeunload tabs first. When that queue is empty, process
// unload tabs.
+ // TODO(ojan): Move some of this logic down into TabContents and/or
+ // WebContents so we don't need to dig into RenderViewHost here.
if (!tabs_needing_before_unload_fired_.empty()) {
TabContents* tab = tabs_needing_before_unload_fired_.back();
- tab->AsWebContents()->FirePageBeforeUnload();
+ tab->AsWebContents()->render_view_host()->FirePageBeforeUnload();
} else if (!tabs_needing_unload_fired_.empty()) {
// We've finished firing all beforeunload events and can proceed with unload
// events.
@@ -1092,7 +1095,7 @@ void Browser::ProcessPendingTabs() {
// get a perf benefit from that in the cases where the tab hangs in it's
// unload handler or takes a long time to page in.
TabContents* tab = tabs_needing_unload_fired_.back();
- tab->AsWebContents()->FirePageUnload();
+ tab->AsWebContents()->render_view_host()->FirePageUnload();
} else {
NOTREACHED();
}
diff --git a/chrome/browser/web_contents.cc b/chrome/browser/web_contents.cc
index 59ade98..9108c7d 100644
--- a/chrome/browser/web_contents.cc
+++ b/chrome/browser/web_contents.cc
@@ -314,14 +314,6 @@ void WebContents::SizeContents(const gfx::Size& size) {
RepositionSupressedPopupsToFit(size);
}
-void WebContents::FirePageBeforeUnload() {
- render_view_host_->FirePageBeforeUnload();
-}
-
-void WebContents::FirePageUnload() {
- render_view_host_->FirePageUnload();
-}
-
void WebContents::Destroy() {
// Tell the notification service we no longer want notifications.
NotificationService::current()->
diff --git a/chrome/browser/web_contents.h b/chrome/browser/web_contents.h
index 25c32a6..2f3a7bd 100644
--- a/chrome/browser/web_contents.h
+++ b/chrome/browser/web_contents.h
@@ -84,17 +84,6 @@ class WebContents : public TabContents,
virtual void HideContents();
virtual void SizeContents(const gfx::Size& size);
- // Causes the renderer to invoke the onbeforeunload event handler. The
- // result will be returned via ViewMsg_ShouldClose.
- virtual void FirePageBeforeUnload();
-
- // Close the page after the page has responded that it can be closed via
- // ViewMsg_ShouldClose. This is where the page itself is closed. The
- // unload handler is triggered here, which can block with a dialog, but cannot
- // cancel the close of the page.
- virtual void FirePageUnload();
-
-
// TabContents
virtual WebContents* AsWebContents() { return this; }
virtual bool Navigate(const NavigationEntry& entry, bool reload);