| 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 "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/strings/sys_string_conversions.h" | 9 #include "base/strings/sys_string_conversions.h" |
| 10 #import "chrome/browser/ui/cocoa/menu_button.h" | 10 #import "chrome/browser/ui/cocoa/menu_button.h" |
| 11 #include "chrome/browser/ui/toolbar/back_forward_menu_model.h" | 11 #include "chrome/browser/ui/toolbar/back_forward_menu_model.h" |
| 12 #import "ui/base/cocoa/cocoa_event_utils.h" | 12 #import "ui/events/event_utils.h" |
| 13 #include "ui/gfx/image/image.h" | 13 #include "ui/gfx/image/image.h" |
| 14 | 14 |
| 15 using base::SysUTF16ToNSString; | 15 using base::SysUTF16ToNSString; |
| 16 | 16 |
| 17 @implementation BackForwardMenuController | 17 @implementation BackForwardMenuController |
| 18 | 18 |
| 19 // Accessors and mutators: | 19 // Accessors and mutators: |
| 20 | 20 |
| 21 @synthesize type = type_; | 21 @synthesize type = type_; |
| 22 | 22 |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 atIndex:(menuID + 1)]; | 85 atIndex:(menuID + 1)]; |
| 86 } | 86 } |
| 87 } | 87 } |
| 88 } | 88 } |
| 89 | 89 |
| 90 // Action methods: | 90 // Action methods: |
| 91 | 91 |
| 92 - (void)executeMenuItem:(id)sender { | 92 - (void)executeMenuItem:(id)sender { |
| 93 DCHECK([sender isKindOfClass:[NSMenuItem class]]); | 93 DCHECK([sender isKindOfClass:[NSMenuItem class]]); |
| 94 int menuID = [sender tag]; | 94 int menuID = [sender tag]; |
| 95 int event_flags = ui::EventFlagsFromNSEvent([NSApp currentEvent]); | 95 int event_flags = ui::EventFlagsFromNative([NSApp currentEvent]); |
| 96 model_->ActivatedAt(menuID, event_flags); | 96 model_->ActivatedAt(menuID, event_flags); |
| 97 } | 97 } |
| 98 | 98 |
| 99 @end // @implementation BackForwardMenuController | 99 @end // @implementation BackForwardMenuController |
| OLD | NEW |