Chromium Code Reviews| Index: chrome/browser/ui/views/download/download_shelf_context_menu_view.cc |
| diff --git a/chrome/browser/ui/views/download/download_shelf_context_menu_view.cc b/chrome/browser/ui/views/download/download_shelf_context_menu_view.cc |
| index 8191673f005b275478fee0d97243c0ff30adb24a..a38fd947a8f62b114cb3b22b3e12cfd452faadfe 100644 |
| --- a/chrome/browser/ui/views/download/download_shelf_context_menu_view.cc |
| +++ b/chrome/browser/ui/views/download/download_shelf_context_menu_view.cc |
| @@ -15,16 +15,20 @@ |
| #include "ui/views/controls/menu/menu_runner.h" |
| DownloadShelfContextMenuView::DownloadShelfContextMenuView( |
| - DownloadItemModel* model, |
| + content::DownloadItem* download_item, |
| content::PageNavigator* navigator) |
| - : DownloadShelfContextMenu(model, navigator) { |
| + : DownloadShelfContextMenu(download_item, navigator) { |
| } |
| DownloadShelfContextMenuView::~DownloadShelfContextMenuView() {} |
| void DownloadShelfContextMenuView::Run(views::Widget* parent_widget, |
| const gfx::Rect& rect) { |
| - views::MenuModelAdapter menu_model_adapter(GetMenuModel()); |
| + ui::MenuModel* menu_model = GetMenuModel(); |
| + // Run() should not be getting called if the DownloadItem was destroyed. |
| + DCHECK(menu_model); |
|
sky
2013/01/07 18:28:24
How come this is a DCHECK, but in the correspondin
asanka
2013/01/07 20:19:25
Oops. I updated download_shelf_context_menu_gtk.cc
|
| + |
| + views::MenuModelAdapter menu_model_adapter(menu_model); |
| menu_runner_.reset(new views::MenuRunner(menu_model_adapter.CreateMenu())); |
| // The menu's alignment is determined based on the UI layout. |