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

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

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/browser_window_fullscreen_transition.h" 5 #import "chrome/browser/ui/cocoa/browser_window_fullscreen_transition.h"
6 6
7 #include <QuartzCore/QuartzCore.h> 7 #include <QuartzCore/QuartzCore.h>
8 8
9 #include <memory>
10
9 #include "base/mac/bind_objc_block.h" 11 #include "base/mac/bind_objc_block.h"
10 #include "base/mac/foundation_util.h" 12 #include "base/mac/foundation_util.h"
11 #include "base/mac/mac_util.h" 13 #include "base/mac/mac_util.h"
12 #import "base/mac/sdk_forward_declarations.h" 14 #import "base/mac/sdk_forward_declarations.h"
13 #include "base/macros.h" 15 #include "base/macros.h"
14 #include "base/memory/scoped_ptr.h"
15 #import "chrome/browser/ui/cocoa/browser_window_controller.h" 16 #import "chrome/browser/ui/cocoa/browser_window_controller.h"
16 #import "chrome/browser/ui/cocoa/framed_browser_window.h" 17 #import "chrome/browser/ui/cocoa/framed_browser_window.h"
17 #import "chrome/browser/ui/cocoa/tabs/tab_strip_background_view.h" 18 #import "chrome/browser/ui/cocoa/tabs/tab_strip_background_view.h"
18 19
19 namespace { 20 namespace {
20 21
21 NSString* const kPrimaryWindowAnimationID = @"PrimaryWindowAnimationID"; 22 NSString* const kPrimaryWindowAnimationID = @"PrimaryWindowAnimationID";
22 NSString* const kSnapshotWindowAnimationID = @"SnapshotWindowAnimationID"; 23 NSString* const kSnapshotWindowAnimationID = @"SnapshotWindowAnimationID";
23 NSString* const kAnimationIDKey = @"AnimationIDKey"; 24 NSString* const kAnimationIDKey = @"AnimationIDKey";
24 25
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 130
130 // The frame that |primaryWindow_| is expected to have after the transition 131 // The frame that |primaryWindow_| is expected to have after the transition
131 // is finished. 132 // is finished.
132 NSRect finalFrame_; 133 NSRect finalFrame_;
133 134
134 // This view draws the tabstrip background during the exit animation. 135 // This view draws the tabstrip background during the exit animation.
135 base::scoped_nsobject<FullscreenTabStripBackgroundView> 136 base::scoped_nsobject<FullscreenTabStripBackgroundView>
136 fullscreenTabStripBackgroundView_; 137 fullscreenTabStripBackgroundView_;
137 138
138 // Locks and unlocks the FullSizeContentWindow. 139 // Locks and unlocks the FullSizeContentWindow.
139 scoped_ptr<FrameAndStyleLock> lock_; 140 std::unique_ptr<FrameAndStyleLock> lock_;
140 141
141 // Flag that indicates if the animation was completed. Sets to true at the 142 // Flag that indicates if the animation was completed. Sets to true at the
142 // end of the animation. 143 // end of the animation.
143 BOOL completedTransition_; 144 BOOL completedTransition_;
144 } 145 }
145 146
146 // Takes a snapshot of |primaryWindow_| and puts it in |snapshotLayer_|. 147 // Takes a snapshot of |primaryWindow_| and puts it in |snapshotLayer_|.
147 - (void)takeSnapshot; 148 - (void)takeSnapshot;
148 149
149 // Creates |snapshotWindow_| and adds |snapshotLayer_| to it. 150 // Creates |snapshotWindow_| and adds |snapshotLayer_| to it.
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 return [[[window contentView] superview] layer]; 544 return [[[window contentView] superview] layer];
544 } 545 }
545 546
546 - (NSPoint)pointRelativeToCurrentScreen:(NSPoint)point { 547 - (NSPoint)pointRelativeToCurrentScreen:(NSPoint)point {
547 NSRect screenFrame = [[primaryWindow_ screen] frame]; 548 NSRect screenFrame = [[primaryWindow_ screen] frame];
548 return NSMakePoint(point.x - screenFrame.origin.x, 549 return NSMakePoint(point.x - screenFrame.origin.x,
549 point.y - screenFrame.origin.y); 550 point.y - screenFrame.origin.y);
550 } 551 }
551 552
552 @end 553 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_controller_unittest.mm ('k') | chrome/browser/ui/cocoa/certificate_viewer_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698