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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 virtual void OnDownloadDestroyed(content::DownloadItem* download) override; | 69 virtual void OnDownloadDestroyed(content::DownloadItem* download) override; |
70 | 70 |
71 ui::SimpleMenuModel* GetInProgressMenuModel(); | 71 ui::SimpleMenuModel* GetInProgressMenuModel(); |
72 ui::SimpleMenuModel* GetFinishedMenuModel(); | 72 ui::SimpleMenuModel* GetFinishedMenuModel(); |
73 ui::SimpleMenuModel* GetInterruptedMenuModel(); | 73 ui::SimpleMenuModel* GetInterruptedMenuModel(); |
74 ui::SimpleMenuModel* GetMaybeMaliciousMenuModel(); | 74 ui::SimpleMenuModel* GetMaybeMaliciousMenuModel(); |
75 ui::SimpleMenuModel* GetMaliciousMenuModel(); | 75 ui::SimpleMenuModel* GetMaliciousMenuModel(); |
76 | 76 |
77 int GetAlwaysOpenStringId() const; | 77 int GetAlwaysOpenStringId() const; |
78 | 78 |
79 #if defined(OS_WIN) | 79 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) |
80 bool IsDownloadPdf() const; | 80 bool IsDownloadPdf() const; |
81 bool CanOpenPdfInReader() const; | 81 bool CanOpenPdfInReader() const; |
82 #endif | 82 #endif |
83 | 83 |
84 // 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 |
85 // download has finished. | 85 // download has finished. |
86 scoped_ptr<ui::SimpleMenuModel> in_progress_download_menu_model_; | 86 scoped_ptr<ui::SimpleMenuModel> in_progress_download_menu_model_; |
87 scoped_ptr<ui::SimpleMenuModel> finished_download_menu_model_; | 87 scoped_ptr<ui::SimpleMenuModel> finished_download_menu_model_; |
88 scoped_ptr<ui::SimpleMenuModel> interrupted_download_menu_model_; | 88 scoped_ptr<ui::SimpleMenuModel> interrupted_download_menu_model_; |
89 scoped_ptr<ui::SimpleMenuModel> maybe_malicious_download_menu_model_; | 89 scoped_ptr<ui::SimpleMenuModel> maybe_malicious_download_menu_model_; |
90 scoped_ptr<ui::SimpleMenuModel> malicious_download_menu_model_; | 90 scoped_ptr<ui::SimpleMenuModel> malicious_download_menu_model_; |
91 | 91 |
92 // Information source. | 92 // Information source. |
93 content::DownloadItem* download_item_; | 93 content::DownloadItem* download_item_; |
94 | 94 |
95 // Used to open tabs. | 95 // Used to open tabs. |
96 content::PageNavigator* navigator_; | 96 content::PageNavigator* navigator_; |
97 | 97 |
98 #if defined(OS_WIN) | 98 #if defined(OS_WIN) |
99 bool is_pdf_reader_up_to_date_; | 99 bool is_pdf_reader_up_to_date_; |
100 #endif | 100 #endif |
101 | 101 |
102 DISALLOW_COPY_AND_ASSIGN(DownloadShelfContextMenu); | 102 DISALLOW_COPY_AND_ASSIGN(DownloadShelfContextMenu); |
103 }; | 103 }; |
104 | 104 |
105 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_SHELF_CONTEXT_MENU_H_ | 105 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_SHELF_CONTEXT_MENU_H_ |
OLD | NEW |