| OLD | NEW |
| 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 #import "chrome/browser/ui/cocoa/menu_button.h" | 5 #import "chrome/browser/ui/cocoa/menu_button.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #import "chrome/browser/ui/cocoa/clickhold_button_cell.h" | 8 #import "chrome/browser/ui/cocoa/clickhold_button_cell.h" |
| 9 #import "chrome/browser/ui/cocoa/nsview_additions.h" | 9 #import "ui/base/cocoa/nsview_additions.h" |
| 10 | 10 |
| 11 @interface MenuButton (Private) | 11 @interface MenuButton (Private) |
| 12 - (void)showMenu:(BOOL)isDragging; | 12 - (void)showMenu:(BOOL)isDragging; |
| 13 - (void)clickShowMenu:(id)sender; | 13 - (void)clickShowMenu:(id)sender; |
| 14 - (void)dragShowMenu:(id)sender; | 14 - (void)dragShowMenu:(id)sender; |
| 15 @end // @interface MenuButton (Private) | 15 @end // @interface MenuButton (Private) |
| 16 | 16 |
| 17 @implementation MenuButton | 17 @implementation MenuButton |
| 18 | 18 |
| 19 @synthesize openMenuOnClick = openMenuOnClick_; | 19 @synthesize openMenuOnClick = openMenuOnClick_; |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 } | 173 } |
| 174 | 174 |
| 175 // Called when the button is clicked and dragged/held. | 175 // Called when the button is clicked and dragged/held. |
| 176 - (void)dragShowMenu:(id)sender { | 176 - (void)dragShowMenu:(id)sender { |
| 177 // We shouldn't get here unless the menu is enabled. | 177 // We shouldn't get here unless the menu is enabled. |
| 178 DCHECK([self attachedMenu]); | 178 DCHECK([self attachedMenu]); |
| 179 [self showMenu:YES]; | 179 [self showMenu:YES]; |
| 180 } | 180 } |
| 181 | 181 |
| 182 @end // @implementation MenuButton (Private) | 182 @end // @implementation MenuButton (Private) |
| OLD | NEW |