Index: chrome/browser/status_icons/desktop_notification_balloon_impl.h |
diff --git a/chrome/browser/status_icons/desktop_notification_balloon_impl.h b/chrome/browser/status_icons/desktop_notification_balloon_impl.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..346acdb71fece3869df25d0f82417777d62af6cc |
--- /dev/null |
+++ b/chrome/browser/status_icons/desktop_notification_balloon_impl.h |
@@ -0,0 +1,38 @@ |
+// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_BROWSER_STATUS_ICONS_DESKTOP_NOTIFICATION_BALLOON_IMPL_H_ |
+#define CHROME_BROWSER_STATUS_ICONS_DESKTOP_NOTIFICATION_BALLOON_IMPL_H_ |
+#pragma once |
+ |
+#include "base/compiler_specific.h" |
+#include "base/memory/scoped_ptr.h" |
+#include "base/string16.h" |
+#include "chrome/browser/status_icons/status_icon.h" |
+ |
+class Notification; |
+class SkBitmap; |
+ |
+// Provides the notification balloon functionality by using desktop |
+// notifications to platforms that don't have a specific native API. |
+class DesktopNotificationBalloonImpl : public StatusIcon { |
Andrew T Wilson (Slow)
2011/10/26 01:21:18
Can this be a separate helper class? Not sure this
Leandro Graciá Gil
2011/10/26 13:52:00
Done.
|
+ public: |
+ DesktopNotificationBalloonImpl(); |
+ virtual ~DesktopNotificationBalloonImpl(); |
+ |
+ virtual void DisplayBalloon(const SkBitmap& icon, |
Andrew T Wilson (Slow)
2011/10/26 01:21:18
Not sure that the current implementation of this r
Leandro Graciá Gil
2011/10/26 13:52:00
It leaves the notification in the screen until the
|
+ const string16& title, |
+ const string16& contents) OVERRIDE; |
+ |
+ private: |
+ // Notification balloon. |
+ scoped_ptr<Notification> notification_; |
+ |
+ // Counter to provide unique ids to notifications. |
+ static int id_count_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(DesktopNotificationBalloonImpl); |
+}; |
+ |
+#endif // CHROME_BROWSER_STATUS_ICONS_DESKTOP_NOTIFICATION_BALLOON_IMPL_H_ |