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

Side by Side Diff: ui/views/widget/native_widget_mac.mm

Issue 2173033002: Make various views SetShape() methods take an unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 4 years, 5 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 | « ui/views/widget/native_widget_mac.h ('k') | ui/views/widget/native_widget_private.h » ('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 #include "ui/views/widget/native_widget_mac.h" 5 #include "ui/views/widget/native_widget_mac.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 } 329 }
330 330
331 void NativeWidgetMac::StackAtTop() { 331 void NativeWidgetMac::StackAtTop() {
332 NOTIMPLEMENTED(); 332 NOTIMPLEMENTED();
333 } 333 }
334 334
335 void NativeWidgetMac::StackBelow(gfx::NativeView native_view) { 335 void NativeWidgetMac::StackBelow(gfx::NativeView native_view) {
336 NOTIMPLEMENTED(); 336 NOTIMPLEMENTED();
337 } 337 }
338 338
339 void NativeWidgetMac::SetShape(SkRegion* shape) { 339 void NativeWidgetMac::SetShape(std::unique_ptr<SkRegion> shape) {
340 NOTIMPLEMENTED(); 340 NOTIMPLEMENTED();
341 } 341 }
342 342
343 void NativeWidgetMac::Close() { 343 void NativeWidgetMac::Close() {
344 if (!bridge_) 344 if (!bridge_)
345 return; 345 return;
346 346
347 NSWindow* window = GetNativeWindow(); 347 NSWindow* window = GetNativeWindow();
348 if (IsWindowModalSheet()) { 348 if (IsWindowModalSheet()) {
349 // Sheets can't be closed normally. This starts the sheet closing. Once the 349 // Sheets can't be closed normally. This starts the sheet closing. Once the
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
762 [[ViewsNSWindowCloseAnimator alloc] initWithWindow:window]; 762 [[ViewsNSWindowCloseAnimator alloc] initWithWindow:window];
763 } 763 }
764 764
765 - (void)animationDidEnd:(NSAnimation*)animation { 765 - (void)animationDidEnd:(NSAnimation*)animation {
766 [window_ close]; 766 [window_ close];
767 [animation_ setDelegate:nil]; 767 [animation_ setDelegate:nil];
768 [self release]; 768 [self release];
769 } 769 }
770 770
771 @end 771 @end
OLDNEW
« no previous file with comments | « ui/views/widget/native_widget_mac.h ('k') | ui/views/widget/native_widget_private.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698