Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7076)

Unified Diff: chrome/browser/download/download_commands.cc

Issue 2138323002: Add output_all_resource_defines=false to theme_resources.grd. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: download bits Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/app/theme/theme_resources.grd ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/download_commands.cc
diff --git a/chrome/browser/download/download_commands.cc b/chrome/browser/download/download_commands.cc
index 0f2417e1a7b7e17e8d1468b54b442cfba6853114..ef52f1e65b3e60e60e9c7d7beaf0727e098979a1 100644
--- a/chrome/browser/download/download_commands.cc
+++ b/chrome/browser/download/download_commands.cc
@@ -118,7 +118,33 @@ class ImageClipboardCopyManager : public ImageDecoder::ImageRequest {
DISALLOW_IMPLICIT_CONSTRUCTORS(ImageClipboardCopyManager);
};
-} // anonymous namespace
+int GetDownloadNotificationMenuIcon(DownloadCommands::Command command) {
+#if defined(OS_CHROMEOS)
+ switch (command) {
+ case DownloadCommands::PAUSE:
+ return IDR_DOWNLOAD_NOTIFICATION_MENU_PAUSE;
+ case DownloadCommands::RESUME:
+ return IDR_DOWNLOAD_NOTIFICATION_MENU_DOWNLOAD;
+ case DownloadCommands::SHOW_IN_FOLDER:
+ return IDR_DOWNLOAD_NOTIFICATION_MENU_FOLDER;
+ case DownloadCommands::KEEP:
+ return IDR_DOWNLOAD_NOTIFICATION_MENU_DOWNLOAD;
+ case DownloadCommands::DISCARD:
+ return IDR_DOWNLOAD_NOTIFICATION_MENU_DELETE;
+ case DownloadCommands::CANCEL:
+ return IDR_DOWNLOAD_NOTIFICATION_MENU_CANCEL;
+ case DownloadCommands::COPY_TO_CLIPBOARD:
+ return IDR_DOWNLOAD_NOTIFICATION_MENU_COPY_TO_CLIPBOARD;
+ default:
+ NOTREACHED();
+ return -1;
+ }
+#else
+ return -1;
+#endif
+}
+
+} // namespace
DownloadCommands::DownloadCommands(content::DownloadItem* download_item)
: download_item_(download_item) {
@@ -128,21 +154,15 @@ DownloadCommands::DownloadCommands(content::DownloadItem* download_item)
int DownloadCommands::GetCommandIconId(Command command) const {
switch (command) {
case PAUSE:
- return IDR_DOWNLOAD_NOTIFICATION_MENU_PAUSE;
case RESUME:
- return IDR_DOWNLOAD_NOTIFICATION_MENU_DOWNLOAD;
case SHOW_IN_FOLDER:
- return IDR_DOWNLOAD_NOTIFICATION_MENU_FOLDER;
case KEEP:
- return IDR_DOWNLOAD_NOTIFICATION_MENU_DOWNLOAD;
case DISCARD:
- return IDR_DOWNLOAD_NOTIFICATION_MENU_DELETE;
case CANCEL:
- return IDR_DOWNLOAD_NOTIFICATION_MENU_CANCEL;
+ case COPY_TO_CLIPBOARD:
+ return GetDownloadNotificationMenuIcon(command);
case LEARN_MORE_SCANNING:
return IDR_NOTIFICATION_WELCOME_LEARN_MORE;
- case COPY_TO_CLIPBOARD:
- return IDR_DOWNLOAD_NOTIFICATION_MENU_COPY_TO_CLIPBOARD;
case OPEN_WHEN_COMPLETE:
case ALWAYS_OPEN_TYPE:
case PLATFORM_OPEN:
« no previous file with comments | « chrome/app/theme/theme_resources.grd ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698