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

Side by Side Diff: chrome/browser/ui/cocoa/sprite_view.mm

Issue 2257553002: Fix OSX 10.12 compilation errors in chrome/browser/ui. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved 10.12 SDK defines to one header. Created 4 years, 4 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
« no previous file with comments | « chrome/browser/ui/cocoa/spinner_view.mm ('k') | chrome/browser/ui/cocoa/status_bubble_mac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/sprite_view.h" 5 #import "chrome/browser/ui/cocoa/sprite_view.h"
6 6
7 #import <QuartzCore/CAAnimation.h> 7 #import <QuartzCore/CAAnimation.h>
8 #import <QuartzCore/CATransaction.h> 8 #import <QuartzCore/CATransaction.h>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #import "base/mac/sdk_forward_declarations.h"
11 #include "ui/base/cocoa/animation_utils.h" 12 #include "ui/base/cocoa/animation_utils.h"
12 13
13 static const CGFloat kFrameDuration = 0.03; // 30ms for each animation frame. 14 static const CGFloat kFrameDuration = 0.03; // 30ms for each animation frame.
14 15
16 @interface SpriteView (Private) <CALayerDelegate>
17 @end
18
15 @implementation SpriteView 19 @implementation SpriteView
16 20
17 - (instancetype)initWithFrame:(NSRect)frame { 21 - (instancetype)initWithFrame:(NSRect)frame {
18 if (self = [super initWithFrame:frame]) { 22 if (self = [super initWithFrame:frame]) {
19 // A layer-hosting view. It will clip its sublayers, 23 // A layer-hosting view. It will clip its sublayers,
20 // if they exceed the boundary. 24 // if they exceed the boundary.
21 CALayer* layer = [CALayer layer]; 25 CALayer* layer = [CALayer layer];
22 layer.masksToBounds = YES; 26 layer.masksToBounds = YES;
23 27
24 imageLayer_ = [CALayer layer]; 28 imageLayer_ = [CALayer layer];
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 } 167 }
164 } 168 }
165 169
166 - (BOOL)layer:(CALayer*)layer 170 - (BOOL)layer:(CALayer*)layer
167 shouldInheritContentsScale:(CGFloat)scale 171 shouldInheritContentsScale:(CGFloat)scale
168 fromWindow:(NSWindow*)window { 172 fromWindow:(NSWindow*)window {
169 return YES; 173 return YES;
170 } 174 }
171 175
172 @end 176 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/spinner_view.mm ('k') | chrome/browser/ui/cocoa/status_bubble_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698