| 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/panels/panel_titlebar_view_cocoa.h" | 5 #import "chrome/browser/ui/panels/panel_titlebar_view_cocoa.h" |
| 6 | 6 |
| 7 #include <Carbon/Carbon.h> // kVK_Escape | 7 #include <Carbon/Carbon.h> // kVK_Escape |
| 8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 [super mouseDown:event]; | 74 [super mouseDown:event]; |
| 75 } | 75 } |
| 76 | 76 |
| 77 - (BOOL)acceptsFirstMouse:(NSEvent*)event { | 77 - (BOOL)acceptsFirstMouse:(NSEvent*)event { |
| 78 return YES; | 78 return YES; |
| 79 } | 79 } |
| 80 @end | 80 @end |
| 81 | 81 |
| 82 @implementation RepaintAnimation | 82 @implementation RepaintAnimation |
| 83 - (id)initWithView:(NSView*)targetView duration:(double) duration { | 83 - (id)initWithView:(NSView*)targetView duration:(double) duration { |
| 84 if (![super initWithDuration:duration animationCurve:NSAnimationEaseInOut]) | 84 if ((self = [super initWithDuration:duration |
| 85 return nil; | 85 animationCurve:NSAnimationEaseInOut])) { |
| 86 [self setAnimationBlockingMode:NSAnimationNonblocking]; | 86 [self setAnimationBlockingMode:NSAnimationNonblocking]; |
| 87 targetView_ = targetView; | 87 targetView_ = targetView; |
| 88 } |
| 88 return self; | 89 return self; |
| 89 } | 90 } |
| 90 | 91 |
| 91 - (void)setCurrentProgress:(NSAnimationProgress)progress { | 92 - (void)setCurrentProgress:(NSAnimationProgress)progress { |
| 92 [super setCurrentProgress:progress]; | 93 [super setCurrentProgress:progress]; |
| 93 [targetView_ setNeedsDisplay:YES]; | 94 [targetView_ setNeedsDisplay:YES]; |
| 94 } | 95 } |
| 95 @end | 96 @end |
| 96 | 97 |
| 97 | 98 |
| (...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 674 } | 675 } |
| 675 | 676 |
| 676 - (void)checkMouseAndUpdateSettingsButtonVisibility { | 677 - (void)checkMouseAndUpdateSettingsButtonVisibility { |
| 677 BOOL mouseOverWindow = NSPointInRect([NSEvent mouseLocation], | 678 BOOL mouseOverWindow = NSPointInRect([NSEvent mouseLocation], |
| 678 [[self window] frame]); | 679 [[self window] frame]); |
| 679 [self updateSettingsButtonVisibility:mouseOverWindow]; | 680 [self updateSettingsButtonVisibility:mouseOverWindow]; |
| 680 } | 681 } |
| 681 | 682 |
| 682 @end | 683 @end |
| 683 | 684 |
| OLD | NEW |