blob: a913f250af5da9e92bc3e0870b4947da3f2af9e2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/notifications/balloon_collection_impl.h"
#include "chrome/browser/notifications/balloon.h"
#include "chrome/browser/views/notifications/balloon_view.h"
#include "gfx/rect.h"
Balloon* BalloonCollectionImpl::MakeBalloon(const Notification& notification,
Profile* profile) {
Balloon* balloon = new Balloon(notification, profile, this);
balloon->set_view(new BalloonViewImpl(this));
gfx::Size size(layout_.min_balloon_width(), layout_.min_balloon_height());
balloon->set_content_size(size);
return balloon;
}
int BalloonCollectionImpl::Layout::InterBalloonMargin() const {
return 3;
}
int BalloonCollectionImpl::Layout::HorizontalEdgeMargin() const {
return 2;
}
int BalloonCollectionImpl::Layout::VerticalEdgeMargin() const {
return 0;
}
// static
BalloonCollection* BalloonCollection::Create() {
return new BalloonCollectionImpl();
}
|