diff options
Diffstat (limited to 'chrome/browser/notifications/balloon_host.cc')
-rw-r--r-- | chrome/browser/notifications/balloon_host.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/chrome/browser/notifications/balloon_host.cc b/chrome/browser/notifications/balloon_host.cc index 1846316..e5590f9 100644 --- a/chrome/browser/notifications/balloon_host.cc +++ b/chrome/browser/notifications/balloon_host.cc @@ -7,6 +7,7 @@ #include "chrome/browser/notifications/notification.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/renderer_preferences_util.h" +#include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_list.h" #include "chrome/browser/ui/webui/chrome_web_ui_factory.h" #include "chrome/common/chrome_notification_types.h" @@ -71,6 +72,18 @@ void BalloonHost::UpdatePreferredSize(WebContents* source, balloon_->SetContentPreferredSize(pref_size); } +void BalloonHost::AddNewContents(WebContents* source, + WebContents* new_contents, + WindowOpenDisposition disposition, + const gfx::Rect& initial_pos, + bool user_gesture) { + Browser* browser = BrowserList::GetLastActiveWithProfile( + Profile::FromBrowserContext(new_contents->GetBrowserContext())); + if (!browser) + return; + browser->AddWebContents(new_contents, disposition, initial_pos, user_gesture); +} + void BalloonHost::RenderViewCreated(RenderViewHost* render_view_host) { render_view_host->DisableScrollbarsForThreshold( balloon_->min_scrollbar_size()); |