OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_shelf_context_menu.h" | 5 #include "chrome/browser/download/download_shelf_context_menu.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "chrome/browser/browser_process.h" | 8 #include "chrome/browser/browser_process.h" |
9 #include "chrome/browser/download/download_crx_util.h" | 9 #include "chrome/browser/download/download_crx_util.h" |
10 #include "chrome/browser/download/download_item_model.h" | 10 #include "chrome/browser/download/download_item_model.h" |
11 #include "chrome/browser/download/download_prefs.h" | 11 #include "chrome/browser/download/download_prefs.h" |
12 #include "chrome/browser/download/download_target_determiner.h" | 12 #include "chrome/browser/download/download_target_determiner.h" |
13 #include "chrome/browser/safe_browsing/download_protection_service.h" | 13 #include "chrome/browser/safe_browsing/download_protection_service.h" |
14 #include "chrome/browser/safe_browsing/safe_browsing_service.h" | 14 #include "chrome/browser/safe_browsing/safe_browsing_service.h" |
15 #include "chrome/common/url_constants.h" | 15 #include "chrome/common/url_constants.h" |
| 16 #include "chrome/grit/generated_resources.h" |
16 #include "content/public/browser/download_item.h" | 17 #include "content/public/browser/download_item.h" |
17 #include "content/public/browser/download_manager.h" | 18 #include "content/public/browser/download_manager.h" |
18 #include "content/public/browser/page_navigator.h" | 19 #include "content/public/browser/page_navigator.h" |
19 #include "content/public/common/content_switches.h" | 20 #include "content/public/common/content_switches.h" |
20 #include "extensions/common/extension.h" | 21 #include "extensions/common/extension.h" |
21 #include "grit/generated_resources.h" | |
22 #include "ui/base/l10n/l10n_util.h" | 22 #include "ui/base/l10n/l10n_util.h" |
23 | 23 |
24 #if defined(OS_WIN) | 24 #if defined(OS_WIN) |
25 #include "chrome/browser/ui/pdf/adobe_reader_info_win.h" | 25 #include "chrome/browser/ui/pdf/adobe_reader_info_win.h" |
26 #endif | 26 #endif |
27 | 27 |
28 using content::DownloadItem; | 28 using content::DownloadItem; |
29 | 29 |
30 namespace { | 30 namespace { |
31 | 31 |
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
395 #if defined(OS_WIN) | 395 #if defined(OS_WIN) |
396 bool DownloadShelfContextMenu::IsDownloadPdf() const { | 396 bool DownloadShelfContextMenu::IsDownloadPdf() const { |
397 base::FilePath path = download_item_->GetTargetFilePath(); | 397 base::FilePath path = download_item_->GetTargetFilePath(); |
398 return path.MatchesExtension(FILE_PATH_LITERAL(".pdf")); | 398 return path.MatchesExtension(FILE_PATH_LITERAL(".pdf")); |
399 } | 399 } |
400 | 400 |
401 bool DownloadShelfContextMenu::CanOpenPdfInReader() const { | 401 bool DownloadShelfContextMenu::CanOpenPdfInReader() const { |
402 return (is_pdf_reader_up_to_date_ && IsDownloadPdf()); | 402 return (is_pdf_reader_up_to_date_ && IsDownloadPdf()); |
403 } | 403 } |
404 #endif | 404 #endif |
OLD | NEW |