| 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 | 94 |
| 95 // Returns a short one-line status string for a download command. | 95 // Returns a short one-line status string for a download command. |
| 96 base::string16 GetCommandLabel(DownloadCommands::Command command) const; | 96 base::string16 GetCommandLabel(DownloadCommands::Command command) const; |
| 97 | 97 |
| 98 // Get the warning test to notify a dangerous download. Should only be called | 98 // Get the warning test to notify a dangerous download. Should only be called |
| 99 // if IsDangerous() is true. | 99 // if IsDangerous() is true. |
| 100 base::string16 GetWarningText() const; | 100 base::string16 GetWarningText() const; |
| 101 | 101 |
| 102 scoped_ptr<std::vector<DownloadCommands::Command>> GetPossibleActions() const; | 102 scoped_ptr<std::vector<DownloadCommands::Command>> GetPossibleActions() const; |
| 103 | 103 |
| 104 bool openable_; | 104 bool openable_ = false; |
| 105 bool downloading_; | 105 bool downloading_ = false; |
| 106 int image_resource_id_; | 106 int image_resource_id_ = 0; |
| 107 Profile* profile_; | 107 Profile* profile_; |
| 108 scoped_refptr<NotificationWatcher> watcher_; | 108 scoped_refptr<NotificationWatcher> watcher_; |
| 109 | |
| 110 scoped_ptr<Notification> notification_; | 109 scoped_ptr<Notification> notification_; |
| 111 | |
| 112 content::DownloadItem* item_; | 110 content::DownloadItem* item_; |
| 113 scoped_ptr<std::vector<DownloadCommands::Command>> button_actions_; | 111 scoped_ptr<std::vector<DownloadCommands::Command>> button_actions_; |
| 114 | |
| 115 Delegate* const delegate_; | 112 Delegate* const delegate_; |
| 116 | 113 |
| 117 DISALLOW_COPY_AND_ASSIGN(DownloadNotificationItem); | 114 DISALLOW_COPY_AND_ASSIGN(DownloadNotificationItem); |
| 118 }; | 115 }; |
| 119 | 116 |
| 120 #endif // CHROME_BROWSER_DOWNLOAD_NOTIFICATION_DOWNLOAD_NOTIFICATION_ITEM_H_ | 117 #endif // CHROME_BROWSER_DOWNLOAD_NOTIFICATION_DOWNLOAD_NOTIFICATION_ITEM_H_ |
| OLD | NEW |