| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 ui::SimpleMenuModel* GetMenuModel(); | 51 ui::SimpleMenuModel* GetMenuModel(); |
| 52 | 52 |
| 53 // ui::SimpleMenuModel::Delegate: | 53 // ui::SimpleMenuModel::Delegate: |
| 54 virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE; | 54 virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE; |
| 55 virtual bool IsCommandIdChecked(int command_id) const OVERRIDE; | 55 virtual bool IsCommandIdChecked(int command_id) const OVERRIDE; |
| 56 virtual void ExecuteCommand(int command_id, int event_flags) OVERRIDE; | 56 virtual void ExecuteCommand(int command_id, int event_flags) OVERRIDE; |
| 57 virtual bool GetAcceleratorForCommandId( | 57 virtual bool GetAcceleratorForCommandId( |
| 58 int command_id, | 58 int command_id, |
| 59 ui::Accelerator* accelerator) OVERRIDE; | 59 ui::Accelerator* accelerator) OVERRIDE; |
| 60 virtual bool IsItemForCommandIdDynamic(int command_id) const OVERRIDE; | 60 virtual bool IsItemForCommandIdDynamic(int command_id) const OVERRIDE; |
| 61 virtual string16 GetLabelForCommandId(int command_id) const OVERRIDE; | 61 virtual base::string16 GetLabelForCommandId(int command_id) const OVERRIDE; |
| 62 | 62 |
| 63 private: | 63 private: |
| 64 // Detaches self from |download_item_|. Called when the DownloadItem is | 64 // Detaches self from |download_item_|. Called when the DownloadItem is |
| 65 // destroyed or when this object is being destroyed. | 65 // destroyed or when this object is being destroyed. |
| 66 void DetachFromDownloadItem(); | 66 void DetachFromDownloadItem(); |
| 67 | 67 |
| 68 // content::DownloadItem::Observer | 68 // content::DownloadItem::Observer |
| 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(); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 85 // Information source. | 85 // Information source. |
| 86 content::DownloadItem* download_item_; | 86 content::DownloadItem* download_item_; |
| 87 | 87 |
| 88 // Used to open tabs. | 88 // Used to open tabs. |
| 89 content::PageNavigator* navigator_; | 89 content::PageNavigator* navigator_; |
| 90 | 90 |
| 91 DISALLOW_COPY_AND_ASSIGN(DownloadShelfContextMenu); | 91 DISALLOW_COPY_AND_ASSIGN(DownloadShelfContextMenu); |
| 92 }; | 92 }; |
| 93 | 93 |
| 94 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_SHELF_CONTEXT_MENU_H_ | 94 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_SHELF_CONTEXT_MENU_H_ |
| OLD | NEW |