| 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 // Returns a short one-line status string for the download. | 92 // Returns a short one-line status string for the download. |
| 93 base::string16 GetTitle() const; | 93 base::string16 GetTitle() const; |
| 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 Browser* GetBrowser(); |
| 103 |
| 102 scoped_ptr<std::vector<DownloadCommands::Command>> GetPossibleActions() const; | 104 scoped_ptr<std::vector<DownloadCommands::Command>> GetPossibleActions() const; |
| 103 | 105 |
| 104 bool openable_; | 106 bool openable_; |
| 105 bool downloading_; | 107 bool downloading_; |
| 106 int image_resource_id_; | 108 int image_resource_id_; |
| 107 Profile* profile_; | 109 Profile* profile_; |
| 108 scoped_refptr<NotificationWatcher> watcher_; | 110 scoped_refptr<NotificationWatcher> watcher_; |
| 109 | 111 |
| 110 scoped_ptr<Notification> notification_; | 112 scoped_ptr<Notification> notification_; |
| 111 | 113 |
| 112 content::DownloadItem* item_; | 114 content::DownloadItem* item_; |
| 113 scoped_ptr<std::vector<DownloadCommands::Command>> button_actions_; | 115 scoped_ptr<std::vector<DownloadCommands::Command>> button_actions_; |
| 114 | 116 |
| 115 Delegate* const delegate_; | 117 Delegate* const delegate_; |
| 116 | 118 |
| 117 DISALLOW_COPY_AND_ASSIGN(DownloadNotificationItem); | 119 DISALLOW_COPY_AND_ASSIGN(DownloadNotificationItem); |
| 118 }; | 120 }; |
| 119 | 121 |
| 120 #endif // CHROME_BROWSER_DOWNLOAD_NOTIFICATION_DOWNLOAD_NOTIFICATION_ITEM_H_ | 122 #endif // CHROME_BROWSER_DOWNLOAD_NOTIFICATION_DOWNLOAD_NOTIFICATION_ITEM_H_ |
| OLD | NEW |