OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #import "chrome/browser/ui/cocoa/toolbar/back_forward_menu_controller.h" | 5 #import "chrome/browser/ui/cocoa/toolbar/back_forward_menu_controller.h" |
6 | 6 |
| 7 #include <memory> |
| 8 |
7 #include "base/logging.h" | 9 #include "base/logging.h" |
8 #include "base/memory/scoped_ptr.h" | |
9 #include "base/strings/sys_string_conversions.h" | 10 #include "base/strings/sys_string_conversions.h" |
10 #import "chrome/browser/ui/cocoa/menu_button.h" | 11 #import "chrome/browser/ui/cocoa/menu_button.h" |
11 #include "chrome/browser/ui/toolbar/back_forward_menu_model.h" | 12 #include "chrome/browser/ui/toolbar/back_forward_menu_model.h" |
12 #import "ui/events/event_utils.h" | 13 #import "ui/events/event_utils.h" |
13 #include "ui/gfx/image/image.h" | 14 #include "ui/gfx/image/image.h" |
14 | 15 |
15 using base::SysUTF16ToNSString; | 16 using base::SysUTF16ToNSString; |
16 | 17 |
17 @implementation BackForwardMenuController | 18 @implementation BackForwardMenuController |
18 | 19 |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 // Action methods: | 98 // Action methods: |
98 | 99 |
99 - (void)executeMenuItem:(id)sender { | 100 - (void)executeMenuItem:(id)sender { |
100 DCHECK([sender isKindOfClass:[NSMenuItem class]]); | 101 DCHECK([sender isKindOfClass:[NSMenuItem class]]); |
101 int menuID = [sender tag]; | 102 int menuID = [sender tag]; |
102 int event_flags = ui::EventFlagsFromNative([NSApp currentEvent]); | 103 int event_flags = ui::EventFlagsFromNative([NSApp currentEvent]); |
103 model_->ActivatedAt(menuID, event_flags); | 104 model_->ActivatedAt(menuID, event_flags); |
104 } | 105 } |
105 | 106 |
106 @end // @implementation BackForwardMenuController | 107 @end // @implementation BackForwardMenuController |
OLD | NEW |