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 #include <string> | 5 #include <string> |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 TestDelegate* new_delegate = new TestDelegate(id); | 112 TestDelegate* new_delegate = new TestDelegate(id); |
113 if (delegate) { | 113 if (delegate) { |
114 *delegate = new_delegate; | 114 *delegate = new_delegate; |
115 new_delegate->AddRef(); | 115 new_delegate->AddRef(); |
116 } | 116 } |
117 | 117 |
118 return Notification(GURL("chrome-test://testing/"), | 118 return Notification(GURL("chrome-test://testing/"), |
119 GURL(), | 119 GURL(), |
120 ASCIIToUTF16("title"), | 120 ASCIIToUTF16("title"), |
121 ASCIIToUTF16("message"), | 121 ASCIIToUTF16("message"), |
122 WebKit::WebTextDirectionDefault, | 122 blink::WebTextDirectionDefault, |
123 UTF8ToUTF16("chrome-test://testing/"), | 123 UTF8ToUTF16("chrome-test://testing/"), |
124 UTF8ToUTF16("REPLACE-ME"), | 124 UTF8ToUTF16("REPLACE-ME"), |
125 new_delegate); | 125 new_delegate); |
126 } | 126 } |
127 | 127 |
128 Notification CreateRichTestNotification(const std::string& id, | 128 Notification CreateRichTestNotification(const std::string& id, |
129 TestDelegate** delegate = NULL) { | 129 TestDelegate** delegate = NULL) { |
130 TestDelegate* new_delegate = new TestDelegate(id); | 130 TestDelegate* new_delegate = new TestDelegate(id); |
131 if (delegate) { | 131 if (delegate) { |
132 *delegate = new_delegate; | 132 *delegate = new_delegate; |
133 new_delegate->AddRef(); | 133 new_delegate->AddRef(); |
134 } | 134 } |
135 | 135 |
136 message_center::RichNotificationData data; | 136 message_center::RichNotificationData data; |
137 | 137 |
138 return Notification(message_center::NOTIFICATION_TYPE_BASE_FORMAT, | 138 return Notification(message_center::NOTIFICATION_TYPE_BASE_FORMAT, |
139 GURL("chrome-test://testing/"), | 139 GURL("chrome-test://testing/"), |
140 ASCIIToUTF16("title"), | 140 ASCIIToUTF16("title"), |
141 ASCIIToUTF16("message"), | 141 ASCIIToUTF16("message"), |
142 gfx::Image(), | 142 gfx::Image(), |
143 WebKit::WebTextDirectionDefault, | 143 blink::WebTextDirectionDefault, |
144 message_center::NotifierId( | 144 message_center::NotifierId( |
145 message_center::NotifierId::APPLICATION, | 145 message_center::NotifierId::APPLICATION, |
146 "extension_id"), | 146 "extension_id"), |
147 UTF8ToUTF16("chrome-test://testing/"), | 147 UTF8ToUTF16("chrome-test://testing/"), |
148 UTF8ToUTF16("REPLACE-ME"), | 148 UTF8ToUTF16("REPLACE-ME"), |
149 data, | 149 data, |
150 new_delegate); | 150 new_delegate); |
151 } | 151 } |
152 }; | 152 }; |
153 | 153 |
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
438 // Cast so that Observe() is public. | 438 // Cast so that Observe() is public. |
439 content::NotificationObserver* observer = | 439 content::NotificationObserver* observer = |
440 static_cast<content::NotificationObserver*>(manager()); | 440 static_cast<content::NotificationObserver*>(manager()); |
441 observer->Observe(chrome::NOTIFICATION_FULLSCREEN_CHANGED, | 441 observer->Observe(chrome::NOTIFICATION_FULLSCREEN_CHANGED, |
442 content::Source<Profile>(profile()), | 442 content::Source<Profile>(profile()), |
443 content::Details<bool>(&is_fullscreen)); | 443 content::Details<bool>(&is_fullscreen)); |
444 EXPECT_FALSE(message_center()->HasPopupNotifications()); | 444 EXPECT_FALSE(message_center()->HasPopupNotifications()); |
445 } | 445 } |
446 | 446 |
447 #endif // !defined(OS_MACOSX) | 447 #endif // !defined(OS_MACOSX) |
OLD | NEW |