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

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

Issue 17593006: mac: Update clients of scoped_nsobject.h. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: iwyu, scoped_nsprotocol Created 7 years, 6 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/cocoa/panels/panel_titlebar_view_cocoa.h" 5 #import "chrome/browser/ui/cocoa/panels/panel_titlebar_view_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/scoped_nsautorelease_pool.h" 10 #include "base/mac/scoped_nsautorelease_pool.h"
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 - (void)drawRect:(NSRect)rect { 139 - (void)drawRect:(NSRect)rect {
140 if (isDrawingAttention_) { 140 if (isDrawingAttention_) {
141 NSColor* attentionColor = [NSColor colorWithCalibratedRed:0x53/255.0 141 NSColor* attentionColor = [NSColor colorWithCalibratedRed:0x53/255.0
142 green:0xa9/255.0 142 green:0xa9/255.0
143 blue:0x3f/255.0 143 blue:0x3f/255.0
144 alpha:1.0]; 144 alpha:1.0];
145 [attentionColor set]; 145 [attentionColor set];
146 NSRectFillUsingOperation([self bounds], NSCompositeSourceOver); 146 NSRectFillUsingOperation([self bounds], NSCompositeSourceOver);
147 147
148 if ([glintAnimation_ isAnimating]) { 148 if ([glintAnimation_ isAnimating]) {
149 scoped_nsobject<NSGradient> glint([NSGradient alloc]); 149 base::scoped_nsobject<NSGradient> glint([NSGradient alloc]);
150 float currentAlpha = 0.8 * [glintAnimation_ currentValue]; 150 float currentAlpha = 0.8 * [glintAnimation_ currentValue];
151 NSColor* startColor = [NSColor colorWithCalibratedWhite:1.0 151 NSColor* startColor = [NSColor colorWithCalibratedWhite:1.0
152 alpha:currentAlpha]; 152 alpha:currentAlpha];
153 NSColor* endColor = [NSColor colorWithCalibratedWhite:1.0 153 NSColor* endColor = [NSColor colorWithCalibratedWhite:1.0
154 alpha:0.0]; 154 alpha:0.0];
155 [glint initWithColorsAndLocations: 155 [glint initWithColorsAndLocations:
156 startColor, 0.0, startColor, 0.3, endColor, 1.0, nil]; 156 startColor, 0.0, startColor, 0.3, endColor, 1.0, nil];
157 NSRect bounds = [self bounds]; 157 NSRect bounds = [self bounds];
158 [glint drawInRect:bounds relativeCenterPosition:NSZeroPoint]; 158 [glint drawInRect:bounds relativeCenterPosition:NSZeroPoint];
159 } 159 }
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
567 - (NSButton*)minimizeButton { 567 - (NSButton*)minimizeButton {
568 return minimizeButton_; 568 return minimizeButton_;
569 } 569 }
570 570
571 - (NSButton*)restoreButton { 571 - (NSButton*)restoreButton {
572 return restoreButton_; 572 return restoreButton_;
573 } 573 }
574 574
575 @end 575 @end
576 576
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698