summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/notifications/balloon_collection_linux.cc16
-rw-r--r--chrome/renderer/render_thread.cc2
2 files changed, 15 insertions, 3 deletions
diff --git a/chrome/browser/notifications/balloon_collection_linux.cc b/chrome/browser/notifications/balloon_collection_linux.cc
index bab6895..d787876 100644
--- a/chrome/browser/notifications/balloon_collection_linux.cc
+++ b/chrome/browser/notifications/balloon_collection_linux.cc
@@ -4,10 +4,22 @@
#include "chrome/browser/notifications/balloon_collection.h"
+#include "base/gfx/size.h"
#include "base/logging.h"
+#include "chrome/browser/notifications/balloon.h"
+#include "chrome/browser/views/notifications/balloon_view.h"
Balloon* BalloonCollectionImpl::MakeBalloon(const Notification& notification,
Profile* profile) {
- // TODO(johnnyg): http://crbug.com/23954. Hook up to views.
- return new Balloon(notification, profile, this);
+ Balloon* balloon = new Balloon(notification, profile, this);
+
+ // TODO(johnnyg): hookup to views code for Chrome OS.
+#if defined(TOOLKIT_GTK)
+ balloon->set_view(new BalloonViewImpl());
+ gfx::Size size(layout_.min_balloon_width(), layout_.min_balloon_height());
+ balloon->set_content_size(size);
+#endif
+
+ return balloon;
+
}
diff --git a/chrome/renderer/render_thread.cc b/chrome/renderer/render_thread.cc
index 4059234..952a053 100644
--- a/chrome/renderer/render_thread.cc
+++ b/chrome/renderer/render_thread.cc
@@ -617,7 +617,7 @@ void RenderThread::EnsureWebKitInitialized() {
WebRuntimeFeatures::enableApplicationCache(
command_line.HasSwitch(switches::kEnableApplicationCache));
-#if defined(OS_WIN) || defined(OS_LINUX)
+#if defined(OS_WIN) || (defined(OS_LINUX) && defined(TOOLKIT_GTK))
// Notifications are supported on Windows and Linux only.
WebRuntimeFeatures::enableNotifications(
!command_line.HasSwitch(switches::kDisableDesktopNotifications));