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

Side by Side Diff: chrome/browser/ui/views/ash/balloon_collection_impl_ash.h

Issue 10537158: Add support for Ash to Notifications (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_VIEWS_ASH_BALLOON_COLLECTION_IMPL_ASH_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_ASH_BALLOON_COLLECTION_IMPL_ASH_H_
6 #define CHROME_BROWSER_UI_VIEWS_ASH_BALLOON_COLLECTION_IMPL_ASH_H_ 6 #define CHROME_BROWSER_UI_VIEWS_ASH_BALLOON_COLLECTION_IMPL_ASH_H_
7 #pragma once 7 #pragma once
8 8
9 #include <set> 9 #include <set>
10 10
11 #include "ash/system/web_notification/web_notification_tray.h"
11 #include "chrome/browser/chromeos/notifications/balloon_view_host_chromeos.h" / / MessageCallback 12 #include "chrome/browser/chromeos/notifications/balloon_view_host_chromeos.h" / / MessageCallback
12 #include "chrome/browser/notifications/balloon_collection_impl.h" 13 #include "chrome/browser/notifications/balloon_collection_impl.h"
13 14
14 // Wrapper on top of ::BalloonCollectionImpl to provide an interface for 15 // Wrapper on top of ::BalloonCollectionImpl to provide an interface for
15 // chromeos::SystemNotification. 16 // chromeos::SystemNotification.
16 class BalloonCollectionImplAsh : public ::BalloonCollectionImpl { 17 class BalloonCollectionImplAsh : public BalloonCollectionImpl,
18 public ash::WebNotificationTray::Delegate {
17 public: 19 public:
18 BalloonCollectionImplAsh(); 20 BalloonCollectionImplAsh();
19 virtual ~BalloonCollectionImplAsh(); 21 virtual ~BalloonCollectionImplAsh();
20 22
23 // Overridden from BalloonCollectionImpl.
24 virtual void Add(const Notification& notification,
25 Profile* profile) OVERRIDE;
26 virtual bool HasSpace() const OVERRIDE;
27
28 // WebNotificationTray::Delegate interface.
oshima 2012/06/13 23:58:02 Overridden from XX, or change the above for consis
stevenjb 2012/06/14 04:27:35 Done.
29 virtual void NotificationRemoved(const std::string& notifcation_id) OVERRIDE;
30 virtual void DisableExtension(const std::string& notifcation_id) OVERRIDE;
31 virtual void DisableNotificationsFromSource(
32 const std::string& notifcation_id) OVERRIDE;
33 virtual void ShowSettings(const std::string& notifcation_id) OVERRIDE;
34 virtual void OnClicked(const std::string& notifcation_id) OVERRIDE;
35
21 // Adds a callback for WebUI message. Returns true if the callback 36 // Adds a callback for WebUI message. Returns true if the callback
22 // is succssfully registered, or false otherwise. It fails to add if 37 // is succssfully registered, or false otherwise. It fails to add if
23 // there is no notification that matches NotificationDelegate::id(), 38 // there is no notification that matches NotificationDelegate::id(),
24 // or a callback for given message already exists. The callback 39 // or a callback for given message already exists. The callback
25 // object is owned and deleted by callee. 40 // object is owned and deleted by callee.
26 bool AddWebUIMessageCallback( 41 bool AddWebUIMessageCallback(
27 const Notification& notification, 42 const Notification& notification,
28 const std::string& message, 43 const std::string& message,
29 const chromeos::BalloonViewHost::MessageCallback& callback); 44 const chromeos::BalloonViewHost::MessageCallback& callback);
30 45
(...skipping 22 matching lines...) Expand all
53 68
54 private: 69 private:
55 // Set of unique ids associated with system notifications, used by 70 // Set of unique ids associated with system notifications, used by
56 // MakeBalloon to determine whether or not to enable Web UI. 71 // MakeBalloon to determine whether or not to enable Web UI.
57 std::set<std::string> system_notifications_; 72 std::set<std::string> system_notifications_;
58 73
59 DISALLOW_COPY_AND_ASSIGN(BalloonCollectionImplAsh); 74 DISALLOW_COPY_AND_ASSIGN(BalloonCollectionImplAsh);
60 }; 75 };
61 76
62 #endif // CHROME_BROWSER_UI_VIEWS_ASH_BALLOON_COLLECTION_IMPL_ASH_H_ 77 #endif // CHROME_BROWSER_UI_VIEWS_ASH_BALLOON_COLLECTION_IMPL_ASH_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698