| OLD | NEW |
| 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_NOTIFICATIONS_NOTIFICATION_UI_MANAGER_IMPL_H_ | 5 #ifndef CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_UI_MANAGER_IMPL_H_ |
| 6 #define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_UI_MANAGER_IMPL_H_ | 6 #define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_UI_MANAGER_IMPL_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 public content::NotificationObserver { | 29 public content::NotificationObserver { |
| 30 public: | 30 public: |
| 31 NotificationUIManagerImpl(); | 31 NotificationUIManagerImpl(); |
| 32 virtual ~NotificationUIManagerImpl(); | 32 virtual ~NotificationUIManagerImpl(); |
| 33 | 33 |
| 34 // NotificationUIManager: | 34 // NotificationUIManager: |
| 35 virtual void Add(const Notification& notification, | 35 virtual void Add(const Notification& notification, |
| 36 Profile* profile) OVERRIDE; | 36 Profile* profile) OVERRIDE; |
| 37 virtual bool DoesIdExist(const std::string& notification_id) OVERRIDE; | 37 virtual bool DoesIdExist(const std::string& notification_id) OVERRIDE; |
| 38 virtual bool CancelById(const std::string& notification_id) OVERRIDE; | 38 virtual bool CancelById(const std::string& notification_id) OVERRIDE; |
| 39 virtual std::set<std::string> GetAllIdsByProfileAndSourceOrigin( | |
| 40 Profile* profile, | |
| 41 const GURL& source) OVERRIDE; | |
| 42 virtual bool CancelAllBySourceOrigin(const GURL& source_origin) OVERRIDE; | 39 virtual bool CancelAllBySourceOrigin(const GURL& source_origin) OVERRIDE; |
| 43 virtual bool CancelAllByProfile(Profile* profile) OVERRIDE; | 40 virtual bool CancelAllByProfile(Profile* profile) OVERRIDE; |
| 44 virtual void CancelAll() OVERRIDE; | 41 virtual void CancelAll() OVERRIDE; |
| 45 | 42 |
| 46 void GetQueuedNotificationsForTesting( | 43 void GetQueuedNotificationsForTesting( |
| 47 std::vector<const Notification*>* notifications); | 44 std::vector<const Notification*>* notifications); |
| 48 | 45 |
| 49 protected: | 46 protected: |
| 50 // Attempts to pass a notification from a waiting queue to the subclass for | 47 // Attempts to pass a notification from a waiting queue to the subclass for |
| 51 // presentation. The subclass can return 'false' if it cannot show the | 48 // presentation. The subclass can return 'false' if it cannot show the |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 content::NotificationRegistrar registrar_; | 87 content::NotificationRegistrar registrar_; |
| 91 | 88 |
| 92 // Used by screen-saver and full-screen handling support. | 89 // Used by screen-saver and full-screen handling support. |
| 93 bool is_user_active_; | 90 bool is_user_active_; |
| 94 base::RepeatingTimer<NotificationUIManagerImpl> user_state_check_timer_; | 91 base::RepeatingTimer<NotificationUIManagerImpl> user_state_check_timer_; |
| 95 | 92 |
| 96 DISALLOW_COPY_AND_ASSIGN(NotificationUIManagerImpl); | 93 DISALLOW_COPY_AND_ASSIGN(NotificationUIManagerImpl); |
| 97 }; | 94 }; |
| 98 | 95 |
| 99 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_UI_MANAGER_IMPL_H_ | 96 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_UI_MANAGER_IMPL_H_ |
| OLD | NEW |