| 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/app_menu/app_menu_controller.h" | 5 #import "chrome/browser/ui/cocoa/app_menu/app_menu_controller.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/mac/bundle_locations.h" | 9 #include "base/mac/bundle_locations.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 581 @synthesize editPaste = editPaste_; | 581 @synthesize editPaste = editPaste_; |
| 582 @synthesize zoomItem = zoomItem_; | 582 @synthesize zoomItem = zoomItem_; |
| 583 @synthesize zoomPlus = zoomPlus_; | 583 @synthesize zoomPlus = zoomPlus_; |
| 584 @synthesize zoomDisplay = zoomDisplay_; | 584 @synthesize zoomDisplay = zoomDisplay_; |
| 585 @synthesize zoomMinus = zoomMinus_; | 585 @synthesize zoomMinus = zoomMinus_; |
| 586 @synthesize zoomFullScreen = zoomFullScreen_; | 586 @synthesize zoomFullScreen = zoomFullScreen_; |
| 587 @synthesize toolbarActionsOverflowItem = toolbarActionsOverflowItem_; | 587 @synthesize toolbarActionsOverflowItem = toolbarActionsOverflowItem_; |
| 588 @synthesize overflowActionsContainerView = overflowActionsContainerView_; | 588 @synthesize overflowActionsContainerView = overflowActionsContainerView_; |
| 589 | 589 |
| 590 - (id)initWithController:(AppMenuController*)controller { | 590 - (id)initWithController:(AppMenuController*)controller { |
| 591 if ((self = [super initWithNibName:@"WrenchMenu" | 591 if ((self = [super initWithNibName:@"AppMenu" |
| 592 bundle:base::mac::FrameworkBundle()])) { | 592 bundle:base::mac::FrameworkBundle()])) { |
| 593 propertyReleaser_.Init(self, [AppMenuButtonViewController class]); | 593 propertyReleaser_.Init(self, [AppMenuButtonViewController class]); |
| 594 controller_ = controller; | 594 controller_ = controller; |
| 595 [[NSNotificationCenter defaultCenter] | 595 [[NSNotificationCenter defaultCenter] |
| 596 addObserver:self | 596 addObserver:self |
| 597 selector:@selector(containerSuperviewFrameChanged:) | 597 selector:@selector(containerSuperviewFrameChanged:) |
| 598 name:NSViewFrameDidChangeNotification | 598 name:NSViewFrameDidChangeNotification |
| 599 object:[overflowActionsContainerView_ superview]]; | 599 object:[overflowActionsContainerView_ superview]]; |
| 600 } | 600 } |
| 601 return self; | 601 return self; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 618 // (and thus, after all our ability to adjust it normally). Throw in the | 618 // (and thus, after all our ability to adjust it normally). Throw in the |
| 619 // towel, and simply don't let the frame move from where it's supposed to be. | 619 // towel, and simply don't let the frame move from where it's supposed to be. |
| 620 // TODO(devlin): Yet another Cocoa hack. It'd be good to find a workaround, | 620 // TODO(devlin): Yet another Cocoa hack. It'd be good to find a workaround, |
| 621 // but unlikely unless we replace the Cocoa menu implementation. | 621 // but unlikely unless we replace the Cocoa menu implementation. |
| 622 NSView* containerSuperview = [overflowActionsContainerView_ superview]; | 622 NSView* containerSuperview = [overflowActionsContainerView_ superview]; |
| 623 if (NSMinX([containerSuperview frame]) != 0) | 623 if (NSMinX([containerSuperview frame]) != 0) |
| 624 [containerSuperview setFrameOrigin:NSZeroPoint]; | 624 [containerSuperview setFrameOrigin:NSZeroPoint]; |
| 625 } | 625 } |
| 626 | 626 |
| 627 @end // @implementation AppMenuButtonViewController | 627 @end // @implementation AppMenuButtonViewController |
| OLD | NEW |