Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7177)

Unified Diff: chrome/browser/ui/views/balloon_view_win.h

Issue 11819048: Implement message center on Windows (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Now with more tests, and corrected copyright notices. Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/balloon_view_win.h
diff --git a/chrome/browser/ui/views/balloon_view_win.h b/chrome/browser/ui/views/balloon_view_win.h
new file mode 100644
index 0000000000000000000000000000000000000000..565aeb7e1adccb0457f13b86368183f6d8a16aad
--- /dev/null
+++ b/chrome/browser/ui/views/balloon_view_win.h
@@ -0,0 +1,53 @@
+// Copyright (c) 2013 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_UI_VIEWS_BALLOON_VIEW_WIN_H_
+#define CHROME_BROWSER_UI_VIEWS_BALLOON_VIEW_WIN_H_
+
+#include <vector>
+
+#include "base/memory/linked_ptr.h"
+#include "chrome/browser/notifications/balloon.h"
+
+class GURL;
+
+namespace gfx {
+class ImageSkia;
+}
+
+class BalloonViewWin : public BalloonView {
+ public:
+ explicit BalloonViewWin(BalloonCollection* collection);
+ virtual ~BalloonViewWin();
+
+ // BalloonView interface.
+ virtual void Show(Balloon* balloon) OVERRIDE;
+ virtual void Update() OVERRIDE;
+ virtual void RepositionToBalloon() OVERRIDE;
+ virtual void Close(bool by_user) OVERRIDE;
+ virtual gfx::Size GetSize() const OVERRIDE;
+ virtual BalloonHost* GetHost() const OVERRIDE;
+
+ void SetNotificationIcon(const std::string& id, const gfx::ImageSkia& image);
+ void SetNotificationImage(const std::string& id, const gfx::ImageSkia& image);
+
+ private:
+ class ImageDownload;
+
+ typedef std::vector<linked_ptr<ImageDownload> > ImageDownloads;
+
+ void DownloadImages(const Notification& notification);
+
+ BalloonCollection* collection_;
+ Balloon* balloon_;
+
+ // Track the current notification id and downloads so the notification can be
+ // updated properly.
+ std::string notification_id_;
+ ImageDownloads downloads_;
+
+ DISALLOW_COPY_AND_ASSIGN(BalloonViewWin);
+};
+
+#endif // CHROME_BROWSER_UI_VIEWS_BALLOON_VIEW_WIN_H_

Powered by Google App Engine
This is Rietveld 408576698