| Index: chrome/browser/ui/cocoa/fast_resize_view.mm
|
| diff --git a/chrome/browser/ui/cocoa/fast_resize_view.mm b/chrome/browser/ui/cocoa/fast_resize_view.mm
|
| index 87f7787f287ecc9477ac018a8c3ad258f3f5aace..f4ea8d380b6d794b0f556f4fe3ba0a594f532af4 100644
|
| --- a/chrome/browser/ui/cocoa/fast_resize_view.mm
|
| +++ b/chrome/browser/ui/cocoa/fast_resize_view.mm
|
| @@ -2,10 +2,15 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#import <Cocoa/Cocoa.h>
|
| #import "chrome/browser/ui/cocoa/fast_resize_view.h"
|
|
|
| +#import <Cocoa/Cocoa.h>
|
| +
|
| #include "base/logging.h"
|
| +#include "base/command_line.h"
|
| +#include "base/mac/scoped_nsobject.h"
|
| +#include "ui/base/cocoa/animation_utils.h"
|
| +#include "ui/base/ui_base_switches.h"
|
|
|
| @interface FastResizeView (PrivateMethods)
|
| // Lays out this views subviews. If fast resize mode is on, does not resize any
|
| @@ -16,6 +21,24 @@
|
|
|
| @implementation FastResizeView
|
|
|
| +- (id)initWithFrame:(NSRect)frameRect {
|
| + if ((self = [super initWithFrame:frameRect])) {
|
| + if (!CommandLine::ForCurrentProcess()->HasSwitch(
|
| + switches::kDisableCoreAnimation)) {
|
| + ScopedCAActionDisabler disabler;
|
| + base::scoped_nsobject<CALayer> layer([[CALayer alloc] init]);
|
| + [layer setBackgroundColor:CGColorGetConstantColor(kCGColorWhite)];
|
| + [self setLayer:layer];
|
| + [self setWantsLayer:YES];
|
| + }
|
| + }
|
| + return self;
|
| +}
|
| +
|
| +- (BOOL)isOpaque {
|
| + return YES;
|
| +}
|
| +
|
| - (void)setFastResizeMode:(BOOL)fastResizeMode {
|
| if (fastResizeMode_ == fastResizeMode)
|
| return;
|
|
|