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 #include "chrome/browser/ui/gtk/download/download_shelf_context_menu_gtk.h" | 5 #include "chrome/browser/ui/gtk/download/download_shelf_context_menu_gtk.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "chrome/browser/download/download_item_model.h" | 8 #include "chrome/browser/download/download_item_model.h" |
9 #include "chrome/browser/ui/gtk/download/download_item_gtk.h" | 9 #include "chrome/browser/ui/gtk/download/download_item_gtk.h" |
| 10 #include "content/public/browser/page_navigator.h" |
10 #include "ui/gfx/point.h" | 11 #include "ui/gfx/point.h" |
11 | 12 |
12 DownloadShelfContextMenuGtk::DownloadShelfContextMenuGtk( | 13 DownloadShelfContextMenuGtk::DownloadShelfContextMenuGtk( |
13 BaseDownloadItemModel* model, | 14 BaseDownloadItemModel* model, |
14 DownloadItemGtk* download_item) | 15 DownloadItemGtk* download_item, |
15 : DownloadShelfContextMenu(model), | 16 content::PageNavigator* navigator) |
| 17 : DownloadShelfContextMenu(model, navigator), |
16 download_item_gtk_(download_item) { | 18 download_item_gtk_(download_item) { |
17 } | 19 } |
18 | 20 |
19 DownloadShelfContextMenuGtk::~DownloadShelfContextMenuGtk() {} | 21 DownloadShelfContextMenuGtk::~DownloadShelfContextMenuGtk() {} |
20 | 22 |
21 void DownloadShelfContextMenuGtk::Popup(GtkWidget* widget, | 23 void DownloadShelfContextMenuGtk::Popup(GtkWidget* widget, |
22 GdkEventButton* event) { | 24 GdkEventButton* event) { |
23 menu_.reset(new MenuGtk(this, GetMenuModel())); | 25 menu_.reset(new MenuGtk(this, GetMenuModel())); |
24 | 26 |
25 if (widget) | 27 if (widget) |
(...skipping 25 matching lines...) Expand all Loading... |
51 case TOGGLE_PAUSE: | 53 case TOGGLE_PAUSE: |
52 stock = NULL; | 54 stock = NULL; |
53 break; | 55 break; |
54 | 56 |
55 default: | 57 default: |
56 NOTREACHED(); | 58 NOTREACHED(); |
57 break; | 59 break; |
58 } | 60 } |
59 return stock ? gtk_image_new_from_stock(stock, GTK_ICON_SIZE_MENU) : NULL; | 61 return stock ? gtk_image_new_from_stock(stock, GTK_ICON_SIZE_MENU) : NULL; |
60 } | 62 } |
OLD | NEW |