OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/ui/views/notifications/balloon_view_views.h" | 5 #include "chrome/browser/ui/views/notifications/balloon_view_views.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 | 172 |
173 void BalloonViewImpl::OnDisplayChanged() { | 173 void BalloonViewImpl::OnDisplayChanged() { |
174 collection_->DisplayChanged(); | 174 collection_->DisplayChanged(); |
175 } | 175 } |
176 | 176 |
177 void BalloonViewImpl::OnWorkAreaChanged() { | 177 void BalloonViewImpl::OnWorkAreaChanged() { |
178 collection_->DisplayChanged(); | 178 collection_->DisplayChanged(); |
179 } | 179 } |
180 | 180 |
181 void BalloonViewImpl::ButtonPressed(views::Button* sender, | 181 void BalloonViewImpl::ButtonPressed(views::Button* sender, |
182 const views::Event&) { | 182 const ui::Event&) { |
183 // The only button currently is the close button. | 183 // The only button currently is the close button. |
184 DCHECK(sender == close_button_); | 184 DCHECK(sender == close_button_); |
185 Close(true); | 185 Close(true); |
186 } | 186 } |
187 | 187 |
188 void BalloonViewImpl::DelayedClose(bool by_user) { | 188 void BalloonViewImpl::DelayedClose(bool by_user) { |
189 balloon_->OnClose(by_user); | 189 balloon_->OnClose(by_user); |
190 } | 190 } |
191 | 191 |
192 gfx::Size BalloonViewImpl::GetPreferredSize() { | 192 gfx::Size BalloonViewImpl::GetPreferredSize() { |
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
539 return; | 539 return; |
540 } | 540 } |
541 | 541 |
542 // If the renderer process attached to this balloon is disconnected | 542 // If the renderer process attached to this balloon is disconnected |
543 // (e.g., because of a crash), we want to close the balloon. | 543 // (e.g., because of a crash), we want to close the balloon. |
544 notification_registrar_.Remove( | 544 notification_registrar_.Remove( |
545 this, chrome::NOTIFICATION_NOTIFY_BALLOON_DISCONNECTED, | 545 this, chrome::NOTIFICATION_NOTIFY_BALLOON_DISCONNECTED, |
546 content::Source<Balloon>(balloon_)); | 546 content::Source<Balloon>(balloon_)); |
547 Close(false); | 547 Close(false); |
548 } | 548 } |
OLD | NEW |