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 temporary. Change the asset when prepared. | |
Randy Smith (Not in Mondays)
2015/04/10 21:43:19
Could you give me context for this comment, prefer
yoshiki
2015/04/13 15:51:53
I changed the context in the comment. The Download
| |
47 return IDR_DOWNLOAD_NOTIFICATION_MENU_DELETE; | |
45 case OPEN_WHEN_COMPLETE: | 48 case OPEN_WHEN_COMPLETE: |
46 case ALWAYS_OPEN_TYPE: | 49 case ALWAYS_OPEN_TYPE: |
47 case PLATFORM_OPEN: | 50 case PLATFORM_OPEN: |
48 case CANCEL: | |
49 case LEARN_MORE_SCANNING: | 51 case LEARN_MORE_SCANNING: |
50 case LEARN_MORE_INTERRUPTED: | 52 case LEARN_MORE_INTERRUPTED: |
51 return -1; | 53 return -1; |
52 } | 54 } |
53 NOTREACHED(); | 55 NOTREACHED(); |
54 return -1; | 56 return -1; |
55 } | 57 } |
56 | 58 |
57 gfx::Image DownloadCommands::GetCommandIcon(Command command) { | 59 gfx::Image DownloadCommands::GetCommandIcon(Command command) { |
58 ResourceBundle& bundle = ResourceBundle::GetSharedInstance(); | 60 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 = | 234 is_adobe_pdf_reader_up_to_date = |
233 DownloadTargetDeterminer::IsAdobeReaderUpToDate(); | 235 DownloadTargetDeterminer::IsAdobeReaderUpToDate(); |
234 } | 236 } |
235 return IsDownloadPdf() && | 237 return IsDownloadPdf() && |
236 (IsAdobeReaderDefaultPDFViewer() ? is_adobe_pdf_reader_up_to_date | 238 (IsAdobeReaderDefaultPDFViewer() ? is_adobe_pdf_reader_up_to_date |
237 : true); | 239 : true); |
238 #elif defined(OS_MACOSX) || defined(OS_LINUX) | 240 #elif defined(OS_MACOSX) || defined(OS_LINUX) |
239 return IsDownloadPdf(); | 241 return IsDownloadPdf(); |
240 #endif | 242 #endif |
241 } | 243 } |
OLD | NEW |