| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/chromeos/notifications/balloon_collection_impl.h" | 5 #include "chrome/browser/chromeos/notifications/balloon_collection_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "chrome/browser/browser_list.h" | 10 #include "chrome/browser/browser_list.h" |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 } | 104 } |
| 105 | 105 |
| 106 bool BalloonCollectionImpl::RemoveById(const std::string& id) { | 106 bool BalloonCollectionImpl::RemoveById(const std::string& id) { |
| 107 return base_.CloseById(id); | 107 return base_.CloseById(id); |
| 108 } | 108 } |
| 109 | 109 |
| 110 bool BalloonCollectionImpl::RemoveBySourceOrigin(const GURL& origin) { | 110 bool BalloonCollectionImpl::RemoveBySourceOrigin(const GURL& origin) { |
| 111 return base_.CloseAllBySourceOrigin(origin); | 111 return base_.CloseAllBySourceOrigin(origin); |
| 112 } | 112 } |
| 113 | 113 |
| 114 void BalloonCollectionImpl::RemoveAll() { |
| 115 base_.CloseAll(); |
| 116 } |
| 117 |
| 114 bool BalloonCollectionImpl::HasSpace() const { | 118 bool BalloonCollectionImpl::HasSpace() const { |
| 115 return true; | 119 return true; |
| 116 } | 120 } |
| 117 | 121 |
| 118 void BalloonCollectionImpl::ResizeBalloon(Balloon* balloon, | 122 void BalloonCollectionImpl::ResizeBalloon(Balloon* balloon, |
| 119 const gfx::Size& size) { | 123 const gfx::Size& size) { |
| 120 notification_ui_->ResizeNotification(balloon, size); | 124 notification_ui_->ResizeNotification(balloon, size); |
| 121 } | 125 } |
| 122 | 126 |
| 123 void BalloonCollectionImpl::OnBalloonClosed(Balloon* source) { | 127 void BalloonCollectionImpl::OnBalloonClosed(Balloon* source) { |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 new_balloon->set_view(new chromeos::BalloonViewImpl(false, true, false)); | 160 new_balloon->set_view(new chromeos::BalloonViewImpl(false, true, false)); |
| 157 return new_balloon; | 161 return new_balloon; |
| 158 } | 162 } |
| 159 | 163 |
| 160 } // namespace chromeos | 164 } // namespace chromeos |
| 161 | 165 |
| 162 // static | 166 // static |
| 163 BalloonCollection* BalloonCollection::Create() { | 167 BalloonCollection* BalloonCollection::Create() { |
| 164 return new chromeos::BalloonCollectionImpl(); | 168 return new chromeos::BalloonCollectionImpl(); |
| 165 } | 169 } |
| OLD | NEW |