| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_CHROMEOS_FILE_MANAGER_DESKTOP_NOTIFICATIONS_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_FILE_MANAGER_DESKTOP_NOTIFICATIONS_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_FILE_MANAGER_DESKTOP_NOTIFICATIONS_H_ | 6 #define CHROME_BROWSER_CHROMEOS_FILE_MANAGER_DESKTOP_NOTIFICATIONS_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 base::TimeDelta delay); | 68 base::TimeDelta delay); |
| 69 | 69 |
| 70 size_t GetNotificationCountForTest() const { | 70 size_t GetNotificationCountForTest() const { |
| 71 return notification_map_.size(); | 71 return notification_map_.size(); |
| 72 } | 72 } |
| 73 | 73 |
| 74 bool HasNotificationForTest(const std::string& id) const { | 74 bool HasNotificationForTest(const std::string& id) const { |
| 75 return notification_map_.find(id) != notification_map_.end(); | 75 return notification_map_.find(id) != notification_map_.end(); |
| 76 } | 76 } |
| 77 | 77 |
| 78 string16 GetNotificationMessageForTest(const std::string& id) const; | 78 base::string16 GetNotificationMessageForTest(const std::string& id) const; |
| 79 | 79 |
| 80 private: | 80 private: |
| 81 class NotificationMessage; | 81 class NotificationMessage; |
| 82 struct MountRequestsInfo; | 82 struct MountRequestsInfo; |
| 83 | 83 |
| 84 typedef std::map<std::string, MountRequestsInfo> MountRequestsMap; | 84 typedef std::map<std::string, MountRequestsInfo> MountRequestsMap; |
| 85 typedef std::map<std::string, NotificationMessage*> NotificationMap; | 85 typedef std::map<std::string, NotificationMessage*> NotificationMap; |
| 86 | 86 |
| 87 // Virtual for mock in unittest. | 87 // Virtual for mock in unittest. |
| 88 virtual void ShowNotificationWithMessage(NotificationType type, | 88 virtual void ShowNotificationWithMessage(NotificationType type, |
| 89 const std::string& path, | 89 const std::string& path, |
| 90 const string16& message); | 90 const base::string16& message); |
| 91 void ShowNotificationById(NotificationType type, | 91 void ShowNotificationById(NotificationType type, |
| 92 const std::string& notification_id, | 92 const std::string& notification_id, |
| 93 const string16& message); | 93 const base::string16& message); |
| 94 void HideNotificationById(const std::string& notification_id); | 94 void HideNotificationById(const std::string& notification_id); |
| 95 void RemoveNotificationById(const std::string& notification_id); | 95 void RemoveNotificationById(const std::string& notification_id); |
| 96 | 96 |
| 97 NotificationMap notification_map_; | 97 NotificationMap notification_map_; |
| 98 std::set<std::string> hidden_notifications_; | 98 std::set<std::string> hidden_notifications_; |
| 99 MountRequestsMap mount_requests_; | 99 MountRequestsMap mount_requests_; |
| 100 Profile* profile_; | 100 Profile* profile_; |
| 101 | 101 |
| 102 DISALLOW_COPY_AND_ASSIGN(DesktopNotifications); | 102 DISALLOW_COPY_AND_ASSIGN(DesktopNotifications); |
| 103 }; | 103 }; |
| 104 | 104 |
| 105 } // namespace file_manager | 105 } // namespace file_manager |
| 106 | 106 |
| 107 #endif // CHROME_BROWSER_CHROMEOS_FILE_MANAGER_DESKTOP_NOTIFICATIONS_H_ | 107 #endif // CHROME_BROWSER_CHROMEOS_FILE_MANAGER_DESKTOP_NOTIFICATIONS_H_ |
| OLD | NEW |