OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_SYSTEM_PROVIDER_NOTIFICATION_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_NOTIFICATION_MANAGER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_NOTIFICATION_MANAGER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_NOTIFICATION_MANAGER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
| 9 #include <memory> |
9 #include <string> | 10 #include <string> |
10 | 11 |
11 #include "base/callback.h" | 12 #include "base/callback.h" |
12 #include "base/macros.h" | 13 #include "base/macros.h" |
13 #include "base/memory/scoped_ptr.h" | |
14 #include "chrome/browser/chromeos/file_system_provider/notification_manager_inte
rface.h" | 14 #include "chrome/browser/chromeos/file_system_provider/notification_manager_inte
rface.h" |
15 #include "chrome/browser/chromeos/file_system_provider/provided_file_system_info
.h" | 15 #include "chrome/browser/chromeos/file_system_provider/provided_file_system_info
.h" |
16 #include "chrome/browser/ui/app_icon_loader.h" | 16 #include "chrome/browser/ui/app_icon_loader.h" |
17 | 17 |
18 class Profile; | 18 class Profile; |
19 | 19 |
20 namespace gfx { | 20 namespace gfx { |
21 class Image; | 21 class Image; |
22 class ImageSkia; | 22 class ImageSkia; |
23 } // message gfx | 23 } // message gfx |
(...skipping 28 matching lines...) Expand all Loading... |
52 void OnClose(); | 52 void OnClose(); |
53 | 53 |
54 // AppIconLoaderDelegate overrides: | 54 // AppIconLoaderDelegate overrides: |
55 void OnAppImageUpdated(const std::string& id, | 55 void OnAppImageUpdated(const std::string& id, |
56 const gfx::ImageSkia& image) override; | 56 const gfx::ImageSkia& image) override; |
57 | 57 |
58 private: | 58 private: |
59 typedef std::map<int, NotificationCallback> CallbackMap; | 59 typedef std::map<int, NotificationCallback> CallbackMap; |
60 | 60 |
61 // Creates a notification object for the actual state of the manager. | 61 // Creates a notification object for the actual state of the manager. |
62 scoped_ptr<message_center::Notification> CreateNotification(); | 62 std::unique_ptr<message_center::Notification> CreateNotification(); |
63 | 63 |
64 // Handles a notification result by calling all registered callbacks and | 64 // Handles a notification result by calling all registered callbacks and |
65 // clearing the list. | 65 // clearing the list. |
66 void OnNotificationResult(NotificationResult result); | 66 void OnNotificationResult(NotificationResult result); |
67 | 67 |
68 Profile* profile_; | 68 Profile* profile_; |
69 ProvidedFileSystemInfo file_system_info_; | 69 ProvidedFileSystemInfo file_system_info_; |
70 CallbackMap callbacks_; | 70 CallbackMap callbacks_; |
71 scoped_ptr<AppIconLoader> icon_loader_; | 71 std::unique_ptr<AppIconLoader> icon_loader_; |
72 scoped_ptr<gfx::Image> extension_icon_; | 72 std::unique_ptr<gfx::Image> extension_icon_; |
73 | 73 |
74 DISALLOW_COPY_AND_ASSIGN(NotificationManager); | 74 DISALLOW_COPY_AND_ASSIGN(NotificationManager); |
75 }; | 75 }; |
76 | 76 |
77 } // namespace file_system_provider | 77 } // namespace file_system_provider |
78 } // namespace chromeos | 78 } // namespace chromeos |
79 | 79 |
80 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_NOTIFICATION_MANAGER_H_ | 80 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_NOTIFICATION_MANAGER_H_ |
OLD | NEW |