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 #include "chrome/browser/download/download_commands.h" | 5 #include "chrome/browser/download/download_commands.h" |
6 | 6 |
7 #include "chrome/browser/browser_process.h" | 7 #include "chrome/browser/browser_process.h" |
8 #include "chrome/browser/download/download_crx_util.h" | 8 #include "chrome/browser/download/download_crx_util.h" |
9 #include "chrome/browser/download/download_item_model.h" | 9 #include "chrome/browser/download/download_item_model.h" |
10 #include "chrome/browser/download/download_prefs.h" | 10 #include "chrome/browser/download/download_prefs.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 return IDR_DOWNLOAD_NOTIFICATION_MENU_PAUSE; | 35 return IDR_DOWNLOAD_NOTIFICATION_MENU_PAUSE; |
36 case RESUME: | 36 case RESUME: |
37 return IDR_DOWNLOAD_NOTIFICATION_MENU_RESUME; | 37 return IDR_DOWNLOAD_NOTIFICATION_MENU_RESUME; |
38 case SHOW_IN_FOLDER: | 38 case SHOW_IN_FOLDER: |
39 return IDR_DOWNLOAD_NOTIFICATION_MENU_FOLDER; | 39 return IDR_DOWNLOAD_NOTIFICATION_MENU_FOLDER; |
40 case RETRY: | 40 case RETRY: |
41 case KEEP: | 41 case KEEP: |
42 return IDR_DOWNLOAD_NOTIFICATION_MENU_DOWNLOAD; | 42 return IDR_DOWNLOAD_NOTIFICATION_MENU_DOWNLOAD; |
43 case DISCARD: | 43 case DISCARD: |
44 return IDR_DOWNLOAD_NOTIFICATION_MENU_DELETE; | 44 return IDR_DOWNLOAD_NOTIFICATION_MENU_DELETE; |
| 45 case CANCEL: |
| 46 // TODO(yoshiki): This is a temporary image for Download Notification |
| 47 // feature behind the flag. We have to replace the image with proper one |
| 48 // before the feature launch. http://crbug.com/468559 |
| 49 return IDR_DOWNLOAD_NOTIFICATION_MENU_DELETE; |
45 case OPEN_WHEN_COMPLETE: | 50 case OPEN_WHEN_COMPLETE: |
46 case ALWAYS_OPEN_TYPE: | 51 case ALWAYS_OPEN_TYPE: |
47 case PLATFORM_OPEN: | 52 case PLATFORM_OPEN: |
48 case CANCEL: | |
49 case LEARN_MORE_SCANNING: | 53 case LEARN_MORE_SCANNING: |
50 case LEARN_MORE_INTERRUPTED: | 54 case LEARN_MORE_INTERRUPTED: |
51 return -1; | 55 return -1; |
52 } | 56 } |
53 NOTREACHED(); | 57 NOTREACHED(); |
54 return -1; | 58 return -1; |
55 } | 59 } |
56 | 60 |
57 gfx::Image DownloadCommands::GetCommandIcon(Command command) { | 61 gfx::Image DownloadCommands::GetCommandIcon(Command command) { |
58 ResourceBundle& bundle = ResourceBundle::GetSharedInstance(); | 62 ResourceBundle& bundle = ResourceBundle::GetSharedInstance(); |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 is_adobe_pdf_reader_up_to_date = | 236 is_adobe_pdf_reader_up_to_date = |
233 DownloadTargetDeterminer::IsAdobeReaderUpToDate(); | 237 DownloadTargetDeterminer::IsAdobeReaderUpToDate(); |
234 } | 238 } |
235 return IsDownloadPdf() && | 239 return IsDownloadPdf() && |
236 (IsAdobeReaderDefaultPDFViewer() ? is_adobe_pdf_reader_up_to_date | 240 (IsAdobeReaderDefaultPDFViewer() ? is_adobe_pdf_reader_up_to_date |
237 : true); | 241 : true); |
238 #elif defined(OS_MACOSX) || defined(OS_LINUX) | 242 #elif defined(OS_MACOSX) || defined(OS_LINUX) |
239 return IsDownloadPdf(); | 243 return IsDownloadPdf(); |
240 #endif | 244 #endif |
241 } | 245 } |
OLD | NEW |