OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/media_galleries/media_gallery_context_menu.h" | 5 #include "chrome/browser/media_galleries/media_gallery_context_menu.h" |
6 #include "grit/generated_resources.h" | 6 #include "chrome/grit/generated_resources.h" |
7 #include "ui/base/l10n/l10n_util.h" | 7 #include "ui/base/l10n/l10n_util.h" |
8 #include "ui/base/models/menu_model.h" | 8 #include "ui/base/models/menu_model.h" |
9 | 9 |
10 MediaGalleryContextMenu::MediaGalleryContextMenu( | 10 MediaGalleryContextMenu::MediaGalleryContextMenu( |
11 const ForgetGalleryCallback& callback) | 11 const ForgetGalleryCallback& callback) |
12 : ui::SimpleMenuModel(NULL), | 12 : ui::SimpleMenuModel(NULL), |
13 callback_(callback) { | 13 callback_(callback) { |
14 set_delegate(this); | 14 set_delegate(this); |
15 AddItem(1, l10n_util::GetStringUTF16(IDS_MEDIA_GALLERIES_DIALOG_DELETE)); | 15 AddItem(1, l10n_util::GetStringUTF16(IDS_MEDIA_GALLERIES_DIALOG_DELETE)); |
16 } | 16 } |
(...skipping 13 matching lines...) Expand all Loading... |
30 } | 30 } |
31 | 31 |
32 bool MediaGalleryContextMenu::GetAcceleratorForCommandId( | 32 bool MediaGalleryContextMenu::GetAcceleratorForCommandId( |
33 int command_id, ui::Accelerator* accelerator) { | 33 int command_id, ui::Accelerator* accelerator) { |
34 return false; | 34 return false; |
35 } | 35 } |
36 | 36 |
37 void MediaGalleryContextMenu::ExecuteCommand(int command_id, int event_flags) { | 37 void MediaGalleryContextMenu::ExecuteCommand(int command_id, int event_flags) { |
38 callback_.Run(pref_id_); | 38 callback_.Run(pref_id_); |
39 } | 39 } |
OLD | NEW |