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

Side by Side Diff: chrome/browser/ui/gtk/download/download_shelf_context_menu_gtk.cc

Issue 10421021: Make DownloadProtectionService not use BrowserList::GetLastActive() to load a link. Instead pass th… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 7 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 | Annotate | Revision Log
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 #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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/download/download_shelf_context_menu_gtk.h ('k') | chrome/browser/ui/gtk/download/download_shelf_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698