summaryrefslogtreecommitdiffstats
path: root/chrome/browser/notifications/balloon.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/notifications/balloon.cc')
-rw-r--r--chrome/browser/notifications/balloon.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/chrome/browser/notifications/balloon.cc b/chrome/browser/notifications/balloon.cc
index d9d4c1f..da49395 100644
--- a/chrome/browser/notifications/balloon.cc
+++ b/chrome/browser/notifications/balloon.cc
@@ -10,10 +10,10 @@
#include "chrome/browser/renderer_host/site_instance.h"
Balloon::Balloon(const Notification& notification, Profile* profile,
- BalloonCloseListener* listener)
+ BalloonCollection* collection)
: profile_(profile),
notification_(notification),
- close_listener_(listener) {
+ collection_(collection) {
}
Balloon::~Balloon() {
@@ -25,6 +25,10 @@ void Balloon::SetPosition(const gfx::Point& upper_left, bool reposition) {
balloon_view_->RepositionToBalloon();
}
+void Balloon::SetContentPreferredSize(const gfx::Size& size) {
+ collection_->ResizeBalloon(this, size);
+}
+
void Balloon::set_view(BalloonView* balloon_view) {
balloon_view_.reset(balloon_view);
}
@@ -38,8 +42,7 @@ void Balloon::Show() {
void Balloon::OnClose(bool by_user) {
notification_.Close(by_user);
- if (close_listener_)
- close_listener_->OnBalloonClosed(this);
+ collection_->OnBalloonClosed(this);
}
void Balloon::CloseByScript() {