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

Side by Side Diff: chrome/browser/download/download_commands.cc

Issue 1005393003: [Download Notification] Use NotificationUIManager instead of MessageCenter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unused code Created 5 years, 8 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 unified diff | Download patch
OLDNEW
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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698