summaryrefslogtreecommitdiffstats
path: root/chrome/browser/notifications
diff options
context:
space:
mode:
authorkkania@chromium.org <kkania@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-13 17:42:50 +0000
committerkkania@chromium.org <kkania@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-13 17:42:50 +0000
commit4dc553ab89fd93f1f91d115bbefa7a2b8f84f186 (patch)
treeb4e4e043760ed032941f3d28b4f4e5d397db1c70 /chrome/browser/notifications
parentf6a9d2629704bc4b0177287179251eced794a96f (diff)
downloadchromium_src-4dc553ab89fd93f1f91d115bbefa7a2b8f84f186.zip
chromium_src-4dc553ab89fd93f1f91d115bbefa7a2b8f84f186.tar.gz
chromium_src-4dc553ab89fd93f1f91d115bbefa7a2b8f84f186.tar.bz2
Wait for notification balloon hosts' render view to be ready
so that killing the process will remove the balloon. Fixes pyauto test testKillNotificationProcess. BUG=80510 TEST=none Review URL: http://codereview.chromium.org/6920005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85290 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/notifications')
-rw-r--r--chrome/browser/notifications/balloon_host.cc4
-rw-r--r--chrome/browser/notifications/balloon_host.h3
2 files changed, 7 insertions, 0 deletions
diff --git a/chrome/browser/notifications/balloon_host.cc b/chrome/browser/notifications/balloon_host.cc
index 7219be0..250309d 100644
--- a/chrome/browser/notifications/balloon_host.cc
+++ b/chrome/browser/notifications/balloon_host.cc
@@ -253,3 +253,7 @@ void BalloonHost::NotifyDisconnect() {
NotificationType::NOTIFY_BALLOON_DISCONNECTED,
Source<BalloonHost>(this), NotificationService::NoDetails());
}
+
+bool BalloonHost::IsRenderViewReady() const {
+ return should_notify_on_disconnect_;
+}
diff --git a/chrome/browser/notifications/balloon_host.h b/chrome/browser/notifications/balloon_host.h
index 2a03506..840d8ed 100644
--- a/chrome/browser/notifications/balloon_host.h
+++ b/chrome/browser/notifications/balloon_host.h
@@ -124,6 +124,9 @@ class BalloonHost : public RenderViewHostDelegate,
const std::string& value);
virtual void ClearInspectorSettings();
+ // Returns whether the associated render view is ready. Used only for testing.
+ bool IsRenderViewReady() const;
+
protected:
virtual ~BalloonHost();
// Must override in platform specific implementations.