| 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 } | 109 } |
| 110 | 110 |
| 111 void BalloonHost::RenderViewReady() { | 111 void BalloonHost::RenderViewReady() { |
| 112 should_notify_on_disconnect_ = true; | 112 should_notify_on_disconnect_ = true; |
| 113 content::NotificationService::current()->Notify( | 113 content::NotificationService::current()->Notify( |
| 114 chrome::NOTIFICATION_NOTIFY_BALLOON_CONNECTED, | 114 chrome::NOTIFICATION_NOTIFY_BALLOON_CONNECTED, |
| 115 content::Source<BalloonHost>(this), | 115 content::Source<BalloonHost>(this), |
| 116 content::NotificationService::NoDetails()); | 116 content::NotificationService::NoDetails()); |
| 117 } | 117 } |
| 118 | 118 |
| 119 void BalloonHost::RenderViewGone(base::TerminationStatus status) { | 119 void BalloonHost::RenderProcessGone(base::TerminationStatus status) { |
| 120 CloseContents(web_contents_.get()); | 120 CloseContents(web_contents_.get()); |
| 121 } | 121 } |
| 122 | 122 |
| 123 bool BalloonHost::OnMessageReceived(const IPC::Message& message) { | 123 bool BalloonHost::OnMessageReceived(const IPC::Message& message) { |
| 124 bool handled = true; | 124 bool handled = true; |
| 125 IPC_BEGIN_MESSAGE_MAP(BalloonHost, message) | 125 IPC_BEGIN_MESSAGE_MAP(BalloonHost, message) |
| 126 IPC_MESSAGE_HANDLER(ExtensionHostMsg_Request, OnRequest) | 126 IPC_MESSAGE_HANDLER(ExtensionHostMsg_Request, OnRequest) |
| 127 IPC_MESSAGE_UNHANDLED(handled = false) | 127 IPC_MESSAGE_UNHANDLED(handled = false) |
| 128 IPC_END_MESSAGE_MAP() | 128 IPC_END_MESSAGE_MAP() |
| 129 return handled; | 129 return handled; |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 bool BalloonHost::CanLoadDataURLsInWebUI() const { | 180 bool BalloonHost::CanLoadDataURLsInWebUI() const { |
| 181 #if defined(OS_CHROMEOS) | 181 #if defined(OS_CHROMEOS) |
| 182 // Chrome OS uses data URLs in WebUI BalloonHosts. We normally do not allow | 182 // Chrome OS uses data URLs in WebUI BalloonHosts. We normally do not allow |
| 183 // data URLs in WebUI renderers, but normal pages cannot target BalloonHosts, | 183 // data URLs in WebUI renderers, but normal pages cannot target BalloonHosts, |
| 184 // so this should be safe. | 184 // so this should be safe. |
| 185 return true; | 185 return true; |
| 186 #else | 186 #else |
| 187 return false; | 187 return false; |
| 188 #endif | 188 #endif |
| 189 } | 189 } |
| OLD | NEW |