| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "chrome/browser/notifications/balloon.h" | 6 #include "chrome/browser/notifications/balloon.h" |
| 7 #include "chrome/browser/notifications/notification.h" | 7 #include "chrome/browser/notifications/notification.h" |
| 8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
| 9 #include "chrome/browser/renderer_preferences_util.h" | 9 #include "chrome/browser/renderer_preferences_util.h" |
| 10 #include "chrome/browser/ui/browser_list.h" | 10 #include "chrome/browser/ui/browser_list.h" |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 NotificationType::NOTIFY_BALLOON_CONNECTED, | 103 NotificationType::NOTIFY_BALLOON_CONNECTED, |
| 104 Source<BalloonHost>(this), NotificationService::NoDetails()); | 104 Source<BalloonHost>(this), NotificationService::NoDetails()); |
| 105 } | 105 } |
| 106 | 106 |
| 107 void BalloonHost::RenderViewGone(RenderViewHost* render_view_host, | 107 void BalloonHost::RenderViewGone(RenderViewHost* render_view_host, |
| 108 base::TerminationStatus status, | 108 base::TerminationStatus status, |
| 109 int error_code) { | 109 int error_code) { |
| 110 Close(render_view_host); | 110 Close(render_view_host); |
| 111 } | 111 } |
| 112 | 112 |
| 113 int BalloonHost::GetBrowserWindowID() const { | |
| 114 return extension_misc::kUnknownWindowId; | |
| 115 } | |
| 116 | |
| 117 ViewType::Type BalloonHost::GetRenderViewType() const { | 113 ViewType::Type BalloonHost::GetRenderViewType() const { |
| 118 return ViewType::NOTIFICATION; | 114 return ViewType::NOTIFICATION; |
| 119 } | 115 } |
| 120 | 116 |
| 121 RenderViewHostDelegate::View* BalloonHost::GetViewDelegate() { | 117 RenderViewHostDelegate::View* BalloonHost::GetViewDelegate() { |
| 122 return this; | 118 return this; |
| 123 } | 119 } |
| 124 | 120 |
| 125 bool BalloonHost::OnMessageReceived(const IPC::Message& message) { | 121 bool BalloonHost::OnMessageReceived(const IPC::Message& message) { |
| 126 bool handled = true; | 122 bool handled = true; |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 | 229 |
| 234 should_notify_on_disconnect_ = false; | 230 should_notify_on_disconnect_ = false; |
| 235 NotificationService::current()->Notify( | 231 NotificationService::current()->Notify( |
| 236 NotificationType::NOTIFY_BALLOON_DISCONNECTED, | 232 NotificationType::NOTIFY_BALLOON_DISCONNECTED, |
| 237 Source<BalloonHost>(this), NotificationService::NoDetails()); | 233 Source<BalloonHost>(this), NotificationService::NoDetails()); |
| 238 } | 234 } |
| 239 | 235 |
| 240 bool BalloonHost::IsRenderViewReady() const { | 236 bool BalloonHost::IsRenderViewReady() const { |
| 241 return should_notify_on_disconnect_; | 237 return should_notify_on_disconnect_; |
| 242 } | 238 } |
| OLD | NEW |