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/notifications/balloon_host.h" | 5 #include "chrome/browser/notifications/balloon_host.h" |
6 | 6 |
7 #include "chrome/browser/notifications/balloon.h" | 7 #include "chrome/browser/notifications/balloon.h" |
8 #include "chrome/browser/notifications/balloon_collection_impl.h" | 8 #include "chrome/browser/notifications/balloon_collection_impl.h" |
9 #include "chrome/browser/notifications/notification.h" | 9 #include "chrome/browser/notifications/notification.h" |
10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 should_notify_on_disconnect_ = false; | 159 should_notify_on_disconnect_ = false; |
160 content::NotificationService::current()->Notify( | 160 content::NotificationService::current()->Notify( |
161 chrome::NOTIFICATION_NOTIFY_BALLOON_DISCONNECTED, | 161 chrome::NOTIFICATION_NOTIFY_BALLOON_DISCONNECTED, |
162 content::Source<BalloonHost>(this), | 162 content::Source<BalloonHost>(this), |
163 content::NotificationService::NoDetails()); | 163 content::NotificationService::NoDetails()); |
164 } | 164 } |
165 | 165 |
166 bool BalloonHost::IsRenderViewReady() const { | 166 bool BalloonHost::IsRenderViewReady() const { |
167 return should_notify_on_disconnect_; | 167 return should_notify_on_disconnect_; |
168 } | 168 } |
| 169 |
| 170 bool BalloonHost::CanLoadDataURLsInWebUI() const { |
| 171 #if defined(OS_CHROMEOS) |
| 172 // Chrome OS uses data URLs in WebUI BalloonHosts. We normally do not allow |
| 173 // data URLs in WebUI renderers, but normal pages cannot target BalloonHosts, |
| 174 // so this should be safe. |
| 175 return true; |
| 176 #else |
| 177 return false; |
| 178 #endif |
| 179 } |
OLD | NEW |