| OLD | NEW |
| 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 #ifndef CHROME_BROWSER_DOWNLOAD_DOWNLOAD_COMMANDS_H_ | 5 #ifndef CHROME_BROWSER_DOWNLOAD_DOWNLOAD_COMMANDS_H_ |
| 6 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_COMMANDS_H_ | 6 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_COMMANDS_H_ |
| 7 | 7 |
| 8 #include "base/gtest_prod_util.h" | 8 #include "base/gtest_prod_util.h" |
| 9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 explicit DownloadCommands(content::DownloadItem* download_item); | 35 explicit DownloadCommands(content::DownloadItem* download_item); |
| 36 virtual ~DownloadCommands() {} | 36 virtual ~DownloadCommands() {} |
| 37 | 37 |
| 38 gfx::Image GetCommandIcon(Command command); | 38 gfx::Image GetCommandIcon(Command command); |
| 39 | 39 |
| 40 bool IsCommandEnabled(Command command) const; | 40 bool IsCommandEnabled(Command command) const; |
| 41 bool IsCommandChecked(Command command) const; | 41 bool IsCommandChecked(Command command) const; |
| 42 bool IsCommandVisible(Command command) const; | 42 bool IsCommandVisible(Command command) const; |
| 43 void ExecuteCommand(Command command); | 43 void ExecuteCommand(Command command); |
| 44 | 44 |
| 45 #if defined(OS_WIN) || defined(OS_LINUX) || \ | 45 #if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) |
| 46 (defined(OS_MACOSX) && !defined(OS_IOS)) | |
| 47 bool IsDownloadPdf() const; | 46 bool IsDownloadPdf() const; |
| 48 bool CanOpenPdfInSystemViewer() const; | 47 bool CanOpenPdfInSystemViewer() const; |
| 49 #endif | 48 #endif |
| 50 | 49 |
| 51 private: | 50 private: |
| 52 FRIEND_TEST_ALL_PREFIXES( | 51 FRIEND_TEST_ALL_PREFIXES( |
| 53 DownloadCommandsTest, | 52 DownloadCommandsTest, |
| 54 GetLearnMoreURLForInterruptedDownload_ContainsContext); | 53 GetLearnMoreURLForInterruptedDownload_ContainsContext); |
| 55 | 54 |
| 56 Browser* GetBrowser() const; | 55 Browser* GetBrowser() const; |
| 57 int GetCommandIconId(Command command) const; | 56 int GetCommandIconId(Command command) const; |
| 58 GURL GetLearnMoreURLForInterruptedDownload() const; | 57 GURL GetLearnMoreURLForInterruptedDownload() const; |
| 59 void CopyFileAsImageToClipboard() const; | 58 void CopyFileAsImageToClipboard() const; |
| 60 | 59 |
| 61 content::DownloadItem* const download_item_; | 60 content::DownloadItem* const download_item_; |
| 62 }; | 61 }; |
| 63 | 62 |
| 64 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_COMMANDS_H_ | 63 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_COMMANDS_H_ |
| OLD | NEW |