| 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 TabContents* BalloonHost::GetAssociatedTabContents() const { | 59 TabContents* BalloonHost::GetAssociatedTabContents() const { |
| 60 return NULL; | 60 return NULL; |
| 61 } | 61 } |
| 62 | 62 |
| 63 const string16& BalloonHost::GetSource() const { | 63 const string16& BalloonHost::GetSource() const { |
| 64 return balloon_->notification().display_source(); | 64 return balloon_->notification().display_source(); |
| 65 } | 65 } |
| 66 | 66 |
| 67 WebPreferences BalloonHost::GetWebkitPrefs() { | 67 WebPreferences BalloonHost::GetWebkitPrefs() { |
| 68 WebPreferences web_prefs = | 68 WebPreferences web_prefs = |
| 69 RenderViewHostDelegateHelper::GetWebkitPrefs(balloon_->profile(), | 69 RenderViewHostDelegateHelper::GetWebkitPrefs(render_view_host_, |
| 70 enable_web_ui_); | 70 enable_web_ui_); |
| 71 web_prefs.allow_scripts_to_close_windows = true; | 71 web_prefs.allow_scripts_to_close_windows = true; |
| 72 return web_prefs; | 72 return web_prefs; |
| 73 } | 73 } |
| 74 | 74 |
| 75 const GURL& BalloonHost::GetURL() const { | 75 const GURL& BalloonHost::GetURL() const { |
| 76 return balloon_->notification().content_url(); | 76 return balloon_->notification().content_url(); |
| 77 } | 77 } |
| 78 | 78 |
| 79 void BalloonHost::Close(RenderViewHost* render_view_host) { | 79 void BalloonHost::Close(RenderViewHost* render_view_host) { |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 should_notify_on_disconnect_ = false; | 210 should_notify_on_disconnect_ = false; |
| 211 content::NotificationService::current()->Notify( | 211 content::NotificationService::current()->Notify( |
| 212 chrome::NOTIFICATION_NOTIFY_BALLOON_DISCONNECTED, | 212 chrome::NOTIFICATION_NOTIFY_BALLOON_DISCONNECTED, |
| 213 content::Source<BalloonHost>(this), | 213 content::Source<BalloonHost>(this), |
| 214 content::NotificationService::NoDetails()); | 214 content::NotificationService::NoDetails()); |
| 215 } | 215 } |
| 216 | 216 |
| 217 bool BalloonHost::IsRenderViewReady() const { | 217 bool BalloonHost::IsRenderViewReady() const { |
| 218 return should_notify_on_disconnect_; | 218 return should_notify_on_disconnect_; |
| 219 } | 219 } |
| OLD | NEW |