| OLD | NEW |
| 1 // Copyright (c) 2010 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 | 6 |
| 7 #include "chrome/browser/browser_list.h" | 7 #include "chrome/browser/browser_list.h" |
| 8 #include "chrome/browser/extensions/extension_process_manager.h" | 8 #include "chrome/browser/extensions/extension_process_manager.h" |
| 9 #include "chrome/browser/notifications/balloon.h" | 9 #include "chrome/browser/notifications/balloon.h" |
| 10 #include "chrome/browser/notifications/notification.h" | 10 #include "chrome/browser/notifications/notification.h" |
| 11 #include "chrome/browser/profiles/profile.h" | 11 #include "chrome/browser/profiles/profile.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 } | 43 } |
| 44 | 44 |
| 45 void BalloonHost::Shutdown() { | 45 void BalloonHost::Shutdown() { |
| 46 NotifyDisconnect(); | 46 NotifyDisconnect(); |
| 47 if (render_view_host_) { | 47 if (render_view_host_) { |
| 48 render_view_host_->Shutdown(); | 48 render_view_host_->Shutdown(); |
| 49 render_view_host_ = NULL; | 49 render_view_host_ = NULL; |
| 50 } | 50 } |
| 51 } | 51 } |
| 52 | 52 |
| 53 Browser* BalloonHost::GetBrowser() const { | 53 Browser* BalloonHost::GetBrowser() { |
| 54 // Notifications aren't associated with a particular browser. | 54 // Notifications aren't associated with a particular browser. |
| 55 return NULL; | 55 return NULL; |
| 56 } | 56 } |
| 57 | 57 |
| 58 gfx::NativeView BalloonHost::GetNativeViewOfHost() { | 58 gfx::NativeView BalloonHost::GetNativeViewOfHost() { |
| 59 // TODO(aa): Should this return the native view of the BalloonView*? | 59 // TODO(aa): Should this return the native view of the BalloonView*? |
| 60 return NULL; | 60 return NULL; |
| 61 } | 61 } |
| 62 | 62 |
| 63 TabContents* BalloonHost::associated_tab_contents() const { return NULL; } | 63 TabContents* BalloonHost::associated_tab_contents() const { return NULL; } |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 | 253 |
| 254 void BalloonHost::NotifyDisconnect() { | 254 void BalloonHost::NotifyDisconnect() { |
| 255 if (!should_notify_on_disconnect_) | 255 if (!should_notify_on_disconnect_) |
| 256 return; | 256 return; |
| 257 | 257 |
| 258 should_notify_on_disconnect_ = false; | 258 should_notify_on_disconnect_ = false; |
| 259 NotificationService::current()->Notify( | 259 NotificationService::current()->Notify( |
| 260 NotificationType::NOTIFY_BALLOON_DISCONNECTED, | 260 NotificationType::NOTIFY_BALLOON_DISCONNECTED, |
| 261 Source<BalloonHost>(this), NotificationService::NoDetails()); | 261 Source<BalloonHost>(this), NotificationService::NoDetails()); |
| 262 } | 262 } |
| OLD | NEW |