summaryrefslogtreecommitdiffstats
path: root/chrome/browser/notifications/balloon_host.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/notifications/balloon_host.cc')
-rw-r--r--chrome/browser/notifications/balloon_host.cc38
1 files changed, 38 insertions, 0 deletions
diff --git a/chrome/browser/notifications/balloon_host.cc b/chrome/browser/notifications/balloon_host.cc
index 8faaebf..f47d395 100644
--- a/chrome/browser/notifications/balloon_host.cc
+++ b/chrome/browser/notifications/balloon_host.cc
@@ -46,12 +46,36 @@ void BalloonHost::Shutdown() {
}
}
+Browser* BalloonHost::GetBrowser() const {
+ // Notifications aren't associated with a particular browser.
+ return NULL;
+}
+
+gfx::NativeView BalloonHost::GetNativeViewOfHost() {
+ // TODO(aa): Should this return the native view of the BalloonView*?
+ return NULL;
+}
+
+TabContents* BalloonHost::associated_tab_contents() const { return NULL; }
+
WebPreferences BalloonHost::GetWebkitPrefs() {
WebPreferences prefs;
prefs.allow_scripts_to_close_windows = true;
return prefs;
}
+SiteInstance* BalloonHost::GetSiteInstance() const {
+ return site_instance_.get();
+}
+
+Profile* BalloonHost::GetProfile() const {
+ return balloon_->profile();
+}
+
+const GURL& BalloonHost::GetURL() const {
+ return balloon_->notification().content_url();
+}
+
void BalloonHost::Close(RenderViewHost* render_view_host) {
balloon_->CloseByScript();
NotifyDisconnect();
@@ -76,6 +100,18 @@ void BalloonHost::RenderViewGone(RenderViewHost* render_view_host) {
Close(render_view_host);
}
+int BalloonHost::GetBrowserWindowID() const {
+ return extension_misc::kUnknownWindowId;
+}
+
+ViewType::Type BalloonHost::GetRenderViewType() const {
+ return ViewType::NOTIFICATION;
+}
+
+RenderViewHostDelegate::View* BalloonHost::GetViewDelegate() {
+ return this;
+}
+
void BalloonHost::ProcessDOMUIMessage(
const ViewHostMsg_DomMessage_Params& params) {
if (extension_function_dispatcher_.get()) {
@@ -176,6 +212,8 @@ void BalloonHost::ClearInspectorSettings() {
RenderViewHostDelegateHelper::ClearInspectorSettings(GetProfile());
}
+BalloonHost::~BalloonHost() {}
+
void BalloonHost::NotifyDisconnect() {
if (!should_notify_on_disconnect_)
return;