| 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_CHROMEOS_EXTENSIONS_FILE_BROWSER_NOTIFICATIONS_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_FILE_MANAGER_NOTIFICATIO
NS_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_BROWSER_NOTIFICATIONS_H_ | 6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_FILE_MANAGER_NOTIFICATIO
NS_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| 11 | 11 |
| 12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
| 13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
| 14 #include "base/string16.h" | 14 #include "base/string16.h" |
| 15 #include "base/time.h" | 15 #include "base/time.h" |
| 16 | 16 |
| 17 class Profile; | 17 class Profile; |
| 18 | 18 |
| 19 class FileBrowserNotifications | 19 class FileManagerNotifications |
| 20 : public base::SupportsWeakPtr<FileBrowserNotifications> { | 20 : public base::SupportsWeakPtr<FileManagerNotifications> { |
| 21 public: | 21 public: |
| 22 // If changing the enum, please also update kNotificationTypes in .cc file. | 22 // If changing the enum, please also update kNotificationTypes in .cc file. |
| 23 enum NotificationType { | 23 enum NotificationType { |
| 24 DEVICE, | 24 DEVICE, |
| 25 DEVICE_FAIL, | 25 DEVICE_FAIL, |
| 26 DEVICE_EXTERNAL_STORAGE_DISABLED, | 26 DEVICE_EXTERNAL_STORAGE_DISABLED, |
| 27 FORMAT_START, | 27 FORMAT_START, |
| 28 FORMAT_START_FAIL, | 28 FORMAT_START_FAIL, |
| 29 FORMAT_SUCCESS, | 29 FORMAT_SUCCESS, |
| 30 FORMAT_FAIL, | 30 FORMAT_FAIL, |
| 31 }; | 31 }; |
| 32 | 32 |
| 33 explicit FileBrowserNotifications(Profile* profile); | 33 explicit FileManagerNotifications(Profile* profile); |
| 34 virtual ~FileBrowserNotifications(); | 34 virtual ~FileManagerNotifications(); |
| 35 | 35 |
| 36 // Registers the removable device whose mount events will be handled in | 36 // Registers the removable device whose mount events will be handled in |
| 37 // |ManageNotificationsOnMountComplete|. | 37 // |ManageNotificationsOnMountComplete|. |
| 38 void RegisterDevice(const std::string& system_path); | 38 void RegisterDevice(const std::string& system_path); |
| 39 | 39 |
| 40 // Unregisters the removable device whose mount events will be handled in | 40 // Unregisters the removable device whose mount events will be handled in |
| 41 // |ManageNotificationsOnMountComplete|. | 41 // |ManageNotificationsOnMountComplete|. |
| 42 void UnregisterDevice(const std::string& system_path); | 42 void UnregisterDevice(const std::string& system_path); |
| 43 | 43 |
| 44 void ManageNotificationsOnMountCompleted(const std::string& system_path, | 44 void ManageNotificationsOnMountCompleted(const std::string& system_path, |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 const std::string& notification_id, | 87 const std::string& notification_id, |
| 88 const string16& message); | 88 const string16& message); |
| 89 void HideNotificationById(const std::string& notification_id); | 89 void HideNotificationById(const std::string& notification_id); |
| 90 void RemoveNotificationById(const std::string& notification_id); | 90 void RemoveNotificationById(const std::string& notification_id); |
| 91 | 91 |
| 92 NotificationMap notification_map_; | 92 NotificationMap notification_map_; |
| 93 std::set<std::string> hidden_notifications_; | 93 std::set<std::string> hidden_notifications_; |
| 94 MountRequestsMap mount_requests_; | 94 MountRequestsMap mount_requests_; |
| 95 Profile* profile_; | 95 Profile* profile_; |
| 96 | 96 |
| 97 DISALLOW_COPY_AND_ASSIGN(FileBrowserNotifications); | 97 DISALLOW_COPY_AND_ASSIGN(FileManagerNotifications); |
| 98 }; | 98 }; |
| 99 | 99 |
| 100 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_BROWSER_NOTIFICATIONS_H_ | 100 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_FILE_MANAGER_NOTIFICA
TIONS_H_ |
| OLD | NEW |