OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_DOWNLOAD_DOWNLOAD_SHELF_CONTEXT_MENU_H_ | 5 #ifndef CHROME_BROWSER_DOWNLOAD_DOWNLOAD_SHELF_CONTEXT_MENU_H_ |
6 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_SHELF_CONTEXT_MENU_H_ | 6 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_SHELF_CONTEXT_MENU_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 void OnDownloadDestroyed(content::DownloadItem* download) override; | 68 void OnDownloadDestroyed(content::DownloadItem* download) override; |
69 | 69 |
70 ui::SimpleMenuModel* GetInProgressMenuModel(); | 70 ui::SimpleMenuModel* GetInProgressMenuModel(); |
71 ui::SimpleMenuModel* GetFinishedMenuModel(); | 71 ui::SimpleMenuModel* GetFinishedMenuModel(); |
72 ui::SimpleMenuModel* GetInterruptedMenuModel(); | 72 ui::SimpleMenuModel* GetInterruptedMenuModel(); |
73 ui::SimpleMenuModel* GetMaybeMaliciousMenuModel(); | 73 ui::SimpleMenuModel* GetMaybeMaliciousMenuModel(); |
74 ui::SimpleMenuModel* GetMaliciousMenuModel(); | 74 ui::SimpleMenuModel* GetMaliciousMenuModel(); |
75 | 75 |
76 int GetAlwaysOpenStringId() const; | 76 int GetAlwaysOpenStringId() const; |
77 | 77 |
78 #if defined(OS_WIN) | 78 #if defined(OS_WIN) || defined(OS_LINUX) || \ |
| 79 (defined(OS_MACOSX) && !defined(OS_IOS)) |
79 bool IsDownloadPdf() const; | 80 bool IsDownloadPdf() const; |
80 bool CanOpenPdfInReader() const; | 81 bool CanOpenPdfInReader() const; |
81 #endif | 82 #endif |
82 | 83 |
83 // We show slightly different menus if the download is in progress vs. if the | 84 // We show slightly different menus if the download is in progress vs. if the |
84 // download has finished. | 85 // download has finished. |
85 scoped_ptr<ui::SimpleMenuModel> in_progress_download_menu_model_; | 86 scoped_ptr<ui::SimpleMenuModel> in_progress_download_menu_model_; |
86 scoped_ptr<ui::SimpleMenuModel> finished_download_menu_model_; | 87 scoped_ptr<ui::SimpleMenuModel> finished_download_menu_model_; |
87 scoped_ptr<ui::SimpleMenuModel> interrupted_download_menu_model_; | 88 scoped_ptr<ui::SimpleMenuModel> interrupted_download_menu_model_; |
88 scoped_ptr<ui::SimpleMenuModel> maybe_malicious_download_menu_model_; | 89 scoped_ptr<ui::SimpleMenuModel> maybe_malicious_download_menu_model_; |
89 scoped_ptr<ui::SimpleMenuModel> malicious_download_menu_model_; | 90 scoped_ptr<ui::SimpleMenuModel> malicious_download_menu_model_; |
90 | 91 |
91 // Information source. | 92 // Information source. |
92 content::DownloadItem* download_item_; | 93 content::DownloadItem* download_item_; |
93 | 94 |
94 // Used to open tabs. | 95 // Used to open tabs. |
95 content::PageNavigator* navigator_; | 96 content::PageNavigator* navigator_; |
96 | 97 |
97 #if defined(OS_WIN) | 98 #if defined(OS_WIN) |
98 bool is_pdf_reader_up_to_date_; | 99 bool is_pdf_reader_up_to_date_; |
99 #endif | 100 #endif |
100 | 101 |
101 DISALLOW_COPY_AND_ASSIGN(DownloadShelfContextMenu); | 102 DISALLOW_COPY_AND_ASSIGN(DownloadShelfContextMenu); |
102 }; | 103 }; |
103 | 104 |
104 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_SHELF_CONTEXT_MENU_H_ | 105 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_SHELF_CONTEXT_MENU_H_ |
OLD | NEW |