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

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

Issue 10031018: Add a few missing "self = [super init..." notices by the clang static analyzer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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
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 #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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/external_protocol_dialog.mm ('k') | chrome/browser/ui/panels/panel_window_controller_cocoa.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698