OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_DOWNLOAD_NOTIFICATION_DOWNLOAD_NOTIFICATION_ITEM_H_ | 5 #ifndef CHROME_BROWSER_DOWNLOAD_NOTIFICATION_DOWNLOAD_NOTIFICATION_ITEM_H_ |
6 #define CHROME_BROWSER_DOWNLOAD_NOTIFICATION_DOWNLOAD_NOTIFICATION_ITEM_H_ | 6 #define CHROME_BROWSER_DOWNLOAD_NOTIFICATION_DOWNLOAD_NOTIFICATION_ITEM_H_ |
7 | 7 |
8 #include "chrome/browser/download/notification/download_notification_item.h" | 8 #include "chrome/browser/download/notification/download_notification_item.h" |
9 | 9 |
10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 | 95 |
96 // Returns a short one-line status string for a download command. | 96 // Returns a short one-line status string for a download command. |
97 base::string16 GetCommandLabel(DownloadCommands::Command command) const; | 97 base::string16 GetCommandLabel(DownloadCommands::Command command) const; |
98 | 98 |
99 // Get the warning test to notify a dangerous download. Should only be called | 99 // Get the warning test to notify a dangerous download. Should only be called |
100 // if IsDangerous() is true. | 100 // if IsDangerous() is true. |
101 base::string16 GetWarningText() const; | 101 base::string16 GetWarningText() const; |
102 | 102 |
103 Browser* GetBrowser(); | 103 Browser* GetBrowser(); |
104 | 104 |
105 scoped_ptr<std::vector<DownloadCommands::Command>> GetPossibleActions() const; | 105 // Returns the list of possible extra (all except the default) actions. |
| 106 scoped_ptr<std::vector<DownloadCommands::Command>> GetExtraActions() const; |
106 | 107 |
107 bool openable_ = false; | |
108 int image_resource_id_ = 0; | 108 int image_resource_id_ = 0; |
109 content::DownloadItem::DownloadState previous_download_state_ = | 109 content::DownloadItem::DownloadState previous_download_state_ = |
110 content::DownloadItem::MAX_DOWNLOAD_STATE; // As uninitialized state | 110 content::DownloadItem::MAX_DOWNLOAD_STATE; // As uninitialized state |
111 Profile* profile_; | 111 Profile* profile_; |
112 scoped_refptr<NotificationWatcher> watcher_; | 112 scoped_refptr<NotificationWatcher> watcher_; |
113 scoped_ptr<Notification> notification_; | 113 scoped_ptr<Notification> notification_; |
114 content::DownloadItem* item_; | 114 content::DownloadItem* item_; |
115 scoped_ptr<std::vector<DownloadCommands::Command>> button_actions_; | 115 scoped_ptr<std::vector<DownloadCommands::Command>> button_actions_; |
116 Delegate* const delegate_; | 116 Delegate* const delegate_; |
117 | 117 |
118 DISALLOW_COPY_AND_ASSIGN(DownloadNotificationItem); | 118 DISALLOW_COPY_AND_ASSIGN(DownloadNotificationItem); |
119 }; | 119 }; |
120 | 120 |
121 #endif // CHROME_BROWSER_DOWNLOAD_NOTIFICATION_DOWNLOAD_NOTIFICATION_ITEM_H_ | 121 #endif // CHROME_BROWSER_DOWNLOAD_NOTIFICATION_DOWNLOAD_NOTIFICATION_ITEM_H_ |
OLD | NEW |