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

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: Addressed the comments 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 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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698