| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 #import "ui/message_center/cocoa/popup_collection.h" | 5 #import "ui/message_center/cocoa/popup_collection.h" |
| 6 | 6 |
| 7 #include "base/mac/scoped_nsobject.h" | 7 #include "base/mac/scoped_nsobject.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 center_->AddNotification(notification.Pass()); | 69 center_->AddNotification(notification.Pass()); |
| 70 | 70 |
| 71 notification.reset(new message_center::Notification( | 71 notification.reset(new message_center::Notification( |
| 72 message_center::NOTIFICATION_TYPE_SIMPLE, | 72 message_center::NOTIFICATION_TYPE_SIMPLE, |
| 73 "3", | 73 "3", |
| 74 ASCIIToUTF16("Three"), | 74 ASCIIToUTF16("Three"), |
| 75 ASCIIToUTF16("This is the third notification " | 75 ASCIIToUTF16("This is the third notification " |
| 76 "that has a much longer body " | 76 "that has a much longer body " |
| 77 "than the other notifications. It " | 77 "than the other notifications. It " |
| 78 "may not fit on the screen if we " | 78 "may not fit on the screen if we " |
| 79 "set the screen size too small."), | 79 "set the screen size too small or " |
| 80 "if the notification is way too big"), |
| 80 gfx::Image(), | 81 gfx::Image(), |
| 81 string16(), | 82 string16(), |
| 82 message_center::NotifierId(), | 83 message_center::NotifierId(), |
| 83 message_center::RichNotificationData(), | 84 message_center::RichNotificationData(), |
| 84 NULL)); | 85 NULL)); |
| 85 center_->AddNotification(notification.Pass()); | 86 center_->AddNotification(notification.Pass()); |
| 86 WaitForAnimationEnded(); | 87 WaitForAnimationEnded(); |
| 87 } | 88 } |
| 88 | 89 |
| 89 bool CheckSpacingBetween(MCPopupController* upper, MCPopupController* lower) { | 90 bool CheckSpacingBetween(MCPopupController* upper, MCPopupController* lower) { |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 string16(), | 352 string16(), |
| 352 message_center::NotifierId(), | 353 message_center::NotifierId(), |
| 353 message_center::RichNotificationData(), | 354 message_center::RichNotificationData(), |
| 354 NULL)); | 355 NULL)); |
| 355 center_->UpdateNotification("1", notification.Pass()); | 356 center_->UpdateNotification("1", notification.Pass()); |
| 356 | 357 |
| 357 // Release the popup collection before the animation ends. No crash should | 358 // Release the popup collection before the animation ends. No crash should |
| 358 // be expected. | 359 // be expected. |
| 359 collection_.reset(); | 360 collection_.reset(); |
| 360 } | 361 } |
| OLD | NEW |