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

Side by Side Diff: chrome/browser/ui/panels/panel_window_controller_cocoa.mm

Issue 10260028: Update Panel mininimize/restore button on strip and expansion state change. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: feedback changes Created 8 years, 7 months 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/panels/panel_browser_window_gtk.cc ('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) 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 #include "chrome/browser/ui/panels/panel_window_controller_cocoa.h" 5 #include "chrome/browser/ui/panels/panel_window_controller_cocoa.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/mac/bundle_locations.h" 10 #include "base/mac/bundle_locations.h"
(...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after
767 - (void)drag:(NSPoint)mouseLocation { 767 - (void)drag:(NSPoint)mouseLocation {
768 // Convert from Cocoa's screen coordinates to platform-indepedent screen 768 // Convert from Cocoa's screen coordinates to platform-indepedent screen
769 // coordinates because PanelManager method takes platform-indepedent screen 769 // coordinates because PanelManager method takes platform-indepedent screen
770 // coordinates. 770 // coordinates.
771 windowShim_->panel()->manager()->Drag( 771 windowShim_->panel()->manager()->Drag(
772 cocoa_utils::ConvertPointFromCocoaCoordinates(mouseLocation)); 772 cocoa_utils::ConvertPointFromCocoaCoordinates(mouseLocation));
773 } 773 }
774 774
775 - (void)setPanelFrame:(NSRect)frame 775 - (void)setPanelFrame:(NSRect)frame
776 animate:(BOOL)animate { 776 animate:(BOOL)animate {
777 [self updateTitleBarMinimizeRestoreButtonVisibility];
778
779 BOOL jumpToDestination = (!animateOnBoundsChange_ || !animate); 777 BOOL jumpToDestination = (!animateOnBoundsChange_ || !animate);
780 778
781 // If no animation is in progress, apply bounds change instantly. 779 // If no animation is in progress, apply bounds change instantly.
782 if (jumpToDestination && ![self isAnimatingBounds]) { 780 if (jumpToDestination && ![self isAnimatingBounds]) {
783 [[self window] setFrame:frame display:YES animate:NO]; 781 [[self window] setFrame:frame display:YES animate:NO];
784 return; 782 return;
785 } 783 }
786 784
787 NSDictionary *windowResize = [NSDictionary dictionaryWithObjectsAndKeys: 785 NSDictionary *windowResize = [NSDictionary dictionaryWithObjectsAndKeys:
788 [self window], NSViewAnimationTargetKey, 786 [self window], NSViewAnimationTargetKey,
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
1009 [[self window] setLevel:NSDockWindowLevel]; 1007 [[self window] setLevel:NSDockWindowLevel];
1010 } 1008 }
1011 1009
1012 - (void)enableResizeByMouse:(BOOL)enable { 1010 - (void)enableResizeByMouse:(BOOL)enable {
1013 if (![self isWindowLoaded]) 1011 if (![self isWindowLoaded])
1014 return; 1012 return;
1015 [[self window] invalidateCursorRectsForView:overlayView_]; 1013 [[self window] invalidateCursorRectsForView:overlayView_];
1016 } 1014 }
1017 1015
1018 @end 1016 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/panel_browser_window_gtk.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698