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

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

Issue 1868363002: Replace scoped_ptr with std::unique_ptr in //ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scopedptrcc
Patch Set: scopedptrui: rebase-make_scoped_ptr 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 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 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 [window performSelector:@selector(close) withObject:nil afterDelay:0]; 364 [window performSelector:@selector(close) withObject:nil afterDelay:0];
365 } 365 }
366 366
367 void NativeWidgetMac::CloseNow() { 367 void NativeWidgetMac::CloseNow() {
368 if (!bridge_) 368 if (!bridge_)
369 return; 369 return;
370 370
371 // Notify observers while |bridged_| is still valid. 371 // Notify observers while |bridged_| is still valid.
372 delegate_->OnNativeWidgetDestroying(); 372 delegate_->OnNativeWidgetDestroying();
373 // Reset |bridge_| to NULL before destroying it. 373 // Reset |bridge_| to NULL before destroying it.
374 scoped_ptr<BridgedNativeWidget> bridge(std::move(bridge_)); 374 std::unique_ptr<BridgedNativeWidget> bridge(std::move(bridge_));
375 } 375 }
376 376
377 void NativeWidgetMac::Show() { 377 void NativeWidgetMac::Show() {
378 ShowWithWindowState(ui::SHOW_STATE_NORMAL); 378 ShowWithWindowState(ui::SHOW_STATE_NORMAL);
379 } 379 }
380 380
381 void NativeWidgetMac::Hide() { 381 void NativeWidgetMac::Hide() {
382 if (!bridge_) 382 if (!bridge_)
383 return; 383 return;
384 384
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
731 [[ViewsNSWindowCloseAnimator alloc] initWithWindow:window]; 731 [[ViewsNSWindowCloseAnimator alloc] initWithWindow:window];
732 } 732 }
733 733
734 - (void)animationDidEnd:(NSAnimation*)animation { 734 - (void)animationDidEnd:(NSAnimation*)animation {
735 [window_ close]; 735 [window_ close];
736 [animation_ setDelegate:nil]; 736 [animation_ setDelegate:nil];
737 [self release]; 737 [self release];
738 } 738 }
739 739
740 @end 740 @end
OLDNEW
« no previous file with comments | « ui/views/widget/native_widget_mac.h ('k') | ui/views/widget/native_widget_mac_interactive_uitest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698