Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(261)

Side by Side Diff: chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller.mm

Issue 1407103008: mac: Stop using __weak. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/wrench_menu/wrench_menu_controller.h" 5 #import "chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/mac/bundle_locations.h" 8 #include "base/mac/bundle_locations.h"
9 #include "base/scoped_observer.h" 9 #include "base/scoped_observer.h"
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 @synthesize zoomPlus = zoomPlus_; 566 @synthesize zoomPlus = zoomPlus_;
567 @synthesize zoomDisplay = zoomDisplay_; 567 @synthesize zoomDisplay = zoomDisplay_;
568 @synthesize zoomMinus = zoomMinus_; 568 @synthesize zoomMinus = zoomMinus_;
569 @synthesize zoomFullScreen = zoomFullScreen_; 569 @synthesize zoomFullScreen = zoomFullScreen_;
570 @synthesize toolbarActionsOverflowItem = toolbarActionsOverflowItem_; 570 @synthesize toolbarActionsOverflowItem = toolbarActionsOverflowItem_;
571 @synthesize overflowActionsContainerView = overflowActionsContainerView_; 571 @synthesize overflowActionsContainerView = overflowActionsContainerView_;
572 572
573 - (id)initWithController:(WrenchMenuController*)controller { 573 - (id)initWithController:(WrenchMenuController*)controller {
574 if ((self = [super initWithNibName:@"WrenchMenu" 574 if ((self = [super initWithNibName:@"WrenchMenu"
575 bundle:base::mac::FrameworkBundle()])) { 575 bundle:base::mac::FrameworkBundle()])) {
576 propertyReleaser_.Init(self, [WrenchMenuButtonViewController class]);
576 controller_ = controller; 577 controller_ = controller;
577 [[NSNotificationCenter defaultCenter] 578 [[NSNotificationCenter defaultCenter]
578 addObserver:self 579 addObserver:self
579 selector:@selector(containerSuperviewFrameChanged:) 580 selector:@selector(containerSuperviewFrameChanged:)
580 name:NSViewFrameDidChangeNotification 581 name:NSViewFrameDidChangeNotification
581 object:[overflowActionsContainerView_ superview]]; 582 object:[overflowActionsContainerView_ superview]];
582 } 583 }
583 return self; 584 return self;
584 } 585 }
585 586
(...skipping 14 matching lines...) Expand all
600 // (and thus, after all our ability to adjust it normally). Throw in the 601 // (and thus, after all our ability to adjust it normally). Throw in the
601 // towel, and simply don't let the frame move from where it's supposed to be. 602 // towel, and simply don't let the frame move from where it's supposed to be.
602 // TODO(devlin): Yet another Cocoa hack. It'd be good to find a workaround, 603 // TODO(devlin): Yet another Cocoa hack. It'd be good to find a workaround,
603 // but unlikely unless we replace the Cocoa menu implementation. 604 // but unlikely unless we replace the Cocoa menu implementation.
604 NSView* containerSuperview = [overflowActionsContainerView_ superview]; 605 NSView* containerSuperview = [overflowActionsContainerView_ superview];
605 if (NSMinX([containerSuperview frame]) != 0) 606 if (NSMinX([containerSuperview frame]) != 0)
606 [containerSuperview setFrameOrigin:NSZeroPoint]; 607 [containerSuperview setFrameOrigin:NSZeroPoint];
607 } 608 }
608 609
609 @end // @implementation WrenchMenuButtonViewController 610 @end // @implementation WrenchMenuButtonViewController
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698