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 <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "base/strings/string16.h" | 12 #include "base/strings/string16.h" |
13 #include "build/build_config.h" | 13 #include "build/build_config.h" |
14 #include "chrome/browser/download/download_commands.h" | 14 #include "chrome/browser/download/download_commands.h" |
15 #include "content/public/browser/download_item.h" | 15 #include "content/public/browser/download_item.h" |
16 #include "ui/base/models/simple_menu_model.h" | 16 #include "ui/base/models/simple_menu_model.h" |
17 | 17 |
18 namespace content { | |
19 class PageNavigator; | |
20 } | |
21 | |
22 // This class is responsible for the download shelf context menu. Platform | 18 // This class is responsible for the download shelf context menu. Platform |
23 // specific subclasses are responsible for creating and running the menu. | 19 // specific subclasses are responsible for creating and running the menu. |
24 // | 20 // |
25 // The DownloadItem corresponding to the context menu is observed for removal or | 21 // The DownloadItem corresponding to the context menu is observed for removal or |
26 // destruction. | 22 // destruction. |
27 class DownloadShelfContextMenu : public ui::SimpleMenuModel::Delegate, | 23 class DownloadShelfContextMenu : public ui::SimpleMenuModel::Delegate, |
28 public content::DownloadItem::Observer { | 24 public content::DownloadItem::Observer { |
29 public: | 25 public: |
30 ~DownloadShelfContextMenu() override; | 26 ~DownloadShelfContextMenu() override; |
31 | 27 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 std::unique_ptr<ui::SimpleMenuModel> malicious_download_menu_model_; | 67 std::unique_ptr<ui::SimpleMenuModel> malicious_download_menu_model_; |
72 | 68 |
73 // Information source. | 69 // Information source. |
74 content::DownloadItem* download_item_; | 70 content::DownloadItem* download_item_; |
75 std::unique_ptr<DownloadCommands> download_commands_; | 71 std::unique_ptr<DownloadCommands> download_commands_; |
76 | 72 |
77 DISALLOW_COPY_AND_ASSIGN(DownloadShelfContextMenu); | 73 DISALLOW_COPY_AND_ASSIGN(DownloadShelfContextMenu); |
78 }; | 74 }; |
79 | 75 |
80 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_SHELF_CONTEXT_MENU_H_ | 76 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_SHELF_CONTEXT_MENU_H_ |
OLD | NEW |