diff options
author | johnnyg@chromium.org <johnnyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-08 22:14:39 +0000 |
---|---|---|
committer | johnnyg@chromium.org <johnnyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-08 22:14:39 +0000 |
commit | d19ee3444d4c8042a97bd653e57c775206a04bed (patch) | |
tree | 89f0e3822bab8f163ec99ff4dde6a48cd529d54b /chrome/browser/notifications/balloon_host.cc | |
parent | 4cb6dca5bcdabfa14f067f741243ca4fcda0b833 (diff) | |
download | chromium_src-d19ee3444d4c8042a97bd653e57c775206a04bed.zip chromium_src-d19ee3444d4c8042a97bd653e57c775206a04bed.tar.gz chromium_src-d19ee3444d4c8042a97bd653e57c775206a04bed.tar.bz2 |
Add notification processes to the task manager.
BUG=29332
TEST=notifications in task manager
Review URL: http://codereview.chromium.org/1610006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44014 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/notifications/balloon_host.cc')
-rw-r--r-- | chrome/browser/notifications/balloon_host.cc | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/chrome/browser/notifications/balloon_host.cc b/chrome/browser/notifications/balloon_host.cc index 19414a0..541d5a4 100644 --- a/chrome/browser/notifications/balloon_host.cc +++ b/chrome/browser/notifications/balloon_host.cc @@ -41,6 +41,7 @@ BalloonHost::BalloonHost(Balloon* balloon) void BalloonHost::Shutdown() { if (render_view_host_) { + NotifyDisconnect(); render_view_host_->Shutdown(); render_view_host_ = NULL; } @@ -56,27 +57,20 @@ void BalloonHost::Close(RenderViewHost* render_view_host) { balloon_->CloseByScript(); } - void BalloonHost::RenderViewCreated(RenderViewHost* render_view_host) { render_view_host->Send(new ViewMsg_EnablePreferredSizeChangedMode( render_view_host->routing_id())); } -void BalloonHost::RendererReady(RenderViewHost* render_view_host) { +void BalloonHost::RenderViewReady(RenderViewHost* render_view_host) { should_notify_on_disconnect_ = true; NotificationService::current()->Notify( NotificationType::NOTIFY_BALLOON_CONNECTED, - Source<Balloon>(balloon_), NotificationService::NoDetails()); + Source<BalloonHost>(this), NotificationService::NoDetails()); } -void BalloonHost::RendererGone(RenderViewHost* render_view_host) { - if (!should_notify_on_disconnect_) - return; - - should_notify_on_disconnect_ = false; - NotificationService::current()->Notify( - NotificationType::NOTIFY_BALLOON_DISCONNECTED, - Source<Balloon>(balloon_), NotificationService::NoDetails()); +void BalloonHost::RenderViewGone(RenderViewHost* render_view_host) { + Close(render_view_host); } void BalloonHost::ProcessDOMUIMessage(const std::string& message, @@ -141,3 +135,13 @@ void BalloonHost::Init() { initialized_ = true; } + +void BalloonHost::NotifyDisconnect() { + if (!should_notify_on_disconnect_) + return; + + should_notify_on_disconnect_ = false; + NotificationService::current()->Notify( + NotificationType::NOTIFY_BALLOON_DISCONNECTED, + Source<BalloonHost>(this), NotificationService::NoDetails()); +} |