| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_H_ | 5 #ifndef CHROME_BROWSER_DOWNLOAD_DOWNLOAD_SHELF_H_ |
| 6 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_SHELF_H_ | 6 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_SHELF_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "app/menus/simple_menu_model.h" | 9 #include "app/menus/simple_menu_model.h" |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 menus::SimpleMenuModel* GetFinishedMenuModel(); | 66 menus::SimpleMenuModel* GetFinishedMenuModel(); |
| 67 // Information source. | 67 // Information source. |
| 68 DownloadItem* download_; | 68 DownloadItem* download_; |
| 69 | 69 |
| 70 // menus::SimpleMenuModel::Delegate implementation: | 70 // menus::SimpleMenuModel::Delegate implementation: |
| 71 virtual bool IsCommandIdEnabled(int command_id) const; | 71 virtual bool IsCommandIdEnabled(int command_id) const; |
| 72 virtual bool IsCommandIdChecked(int command_id) const; | 72 virtual bool IsCommandIdChecked(int command_id) const; |
| 73 virtual void ExecuteCommand(int command_id); | 73 virtual void ExecuteCommand(int command_id); |
| 74 virtual bool GetAcceleratorForCommandId(int command_id, | 74 virtual bool GetAcceleratorForCommandId(int command_id, |
| 75 menus::Accelerator* accelerator); | 75 menus::Accelerator* accelerator); |
| 76 virtual bool IsLabelForCommandIdDynamic(int command_id) const; | 76 virtual bool IsItemForCommandIdDynamic(int command_id) const; |
| 77 virtual string16 GetLabelForCommandId(int command_id) const; | 77 virtual string16 GetLabelForCommandId(int command_id) const; |
| 78 | 78 |
| 79 // A model to control the cancel behavior. | 79 // A model to control the cancel behavior. |
| 80 BaseDownloadItemModel* model_; | 80 BaseDownloadItemModel* model_; |
| 81 | 81 |
| 82 private: | 82 private: |
| 83 // We show slightly different menus if the download is in progress vs. if the | 83 // We show slightly different menus if the download is in progress vs. if the |
| 84 // download has finished. | 84 // download has finished. |
| 85 scoped_ptr<menus::SimpleMenuModel> in_progress_download_menu_model_; | 85 scoped_ptr<menus::SimpleMenuModel> in_progress_download_menu_model_; |
| 86 scoped_ptr<menus::SimpleMenuModel> finished_download_menu_model_; | 86 scoped_ptr<menus::SimpleMenuModel> finished_download_menu_model_; |
| 87 | 87 |
| 88 DISALLOW_COPY_AND_ASSIGN(DownloadShelfContextMenu); | 88 DISALLOW_COPY_AND_ASSIGN(DownloadShelfContextMenu); |
| 89 }; | 89 }; |
| 90 | 90 |
| 91 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_SHELF_H_ | 91 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_SHELF_H_ |
| OLD | NEW |