Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(325)

Side by Side Diff: chrome/browser/download/download_shelf_context_menu.h

Issue 2140963002: Added default implementations of GetAcceleratorForCommandId. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@acceleratorprovider-const
Patch Set: Rebase. Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <memory> 8 #include <memory>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 25 matching lines...) Expand all
36 36
37 // Returns the correct menu model depending on the state of the download item. 37 // Returns the correct menu model depending on the state of the download item.
38 // Returns NULL if the download was destroyed. 38 // Returns NULL if the download was destroyed.
39 ui::SimpleMenuModel* GetMenuModel(); 39 ui::SimpleMenuModel* GetMenuModel();
40 40
41 // ui::SimpleMenuModel::Delegate: 41 // ui::SimpleMenuModel::Delegate:
42 bool IsCommandIdEnabled(int command_id) const override; 42 bool IsCommandIdEnabled(int command_id) const override;
43 bool IsCommandIdChecked(int command_id) const override; 43 bool IsCommandIdChecked(int command_id) const override;
44 bool IsCommandIdVisible(int command_id) const override; 44 bool IsCommandIdVisible(int command_id) const override;
45 void ExecuteCommand(int command_id, int event_flags) override; 45 void ExecuteCommand(int command_id, int event_flags) override;
46 bool GetAcceleratorForCommandId(int command_id,
47 ui::Accelerator* accelerator) const override;
48 bool IsItemForCommandIdDynamic(int command_id) const override; 46 bool IsItemForCommandIdDynamic(int command_id) const override;
49 base::string16 GetLabelForCommandId(int command_id) const override; 47 base::string16 GetLabelForCommandId(int command_id) const override;
50 48
51 private: 49 private:
52 // Detaches self from |download_item_|. Called when the DownloadItem is 50 // Detaches self from |download_item_|. Called when the DownloadItem is
53 // destroyed or when this object is being destroyed. 51 // destroyed or when this object is being destroyed.
54 void DetachFromDownloadItem(); 52 void DetachFromDownloadItem();
55 53
56 // content::DownloadItem::Observer 54 // content::DownloadItem::Observer
57 void OnDownloadDestroyed(content::DownloadItem* download) override; 55 void OnDownloadDestroyed(content::DownloadItem* download) override;
(...skipping 15 matching lines...) Expand all
73 std::unique_ptr<ui::SimpleMenuModel> malicious_download_menu_model_; 71 std::unique_ptr<ui::SimpleMenuModel> malicious_download_menu_model_;
74 72
75 // Information source. 73 // Information source.
76 content::DownloadItem* download_item_; 74 content::DownloadItem* download_item_;
77 std::unique_ptr<DownloadCommands> download_commands_; 75 std::unique_ptr<DownloadCommands> download_commands_;
78 76
79 DISALLOW_COPY_AND_ASSIGN(DownloadShelfContextMenu); 77 DISALLOW_COPY_AND_ASSIGN(DownloadShelfContextMenu);
80 }; 78 };
81 79
82 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_SHELF_CONTEXT_MENU_H_ 80 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_SHELF_CONTEXT_MENU_H_
OLDNEW
« no previous file with comments | « chrome/browser/apps/app_browsertest.cc ('k') | chrome/browser/download/download_shelf_context_menu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698