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

Side by Side Diff: remoting/host/continue_window_mac.mm

Issue 9720019: Use scoped_ptr<> to pass ownership in more places. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « remoting/host/continue_window_linux.cc ('k') | remoting/host/continue_window_win.cc » ('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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "remoting/host/continue_window.h" 5 #include "remoting/host/continue_window.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 [[ContinueWindowMacController alloc] initWithHost:host 60 [[ContinueWindowMacController alloc] initWithHost:host
61 callback:callback]); 61 callback:callback]);
62 [controller_ show]; 62 [controller_ show];
63 } 63 }
64 64
65 void ContinueWindowMac::Hide() { 65 void ContinueWindowMac::Hide() {
66 base::mac::ScopedNSAutoreleasePool pool; 66 base::mac::ScopedNSAutoreleasePool pool;
67 [controller_ hide]; 67 [controller_ hide];
68 } 68 }
69 69
70 ContinueWindow* ContinueWindow::Create() { 70 scoped_ptr<ContinueWindow> ContinueWindow::Create() {
71 return new ContinueWindowMac(); 71 return scoped_ptr<ContinueWindow>(new ContinueWindowMac());
72 } 72 }
73 73
74 } // namespace remoting 74 } // namespace remoting
75 75
76 @implementation ContinueWindowMacController 76 @implementation ContinueWindowMacController
77 77
78 - (id)initWithHost:(remoting::ChromotingHost*)host 78 - (id)initWithHost:(remoting::ChromotingHost*)host
79 callback:(const ContinueSessionCallback&)callback { 79 callback:(const ContinueSessionCallback&)callback {
80 if ((self = [super init])) { 80 if ((self = [super init])) {
81 host_ = host; 81 host_ = host;
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 host_ = nil; 158 host_ = nil;
159 } 159 }
160 160
161 - (void)onContinue:(id)sender { 161 - (void)onContinue:(id)sender {
162 [self hide]; 162 [self hide];
163 callback_.Run(true); 163 callback_.Run(true);
164 host_ = nil; 164 host_ = nil;
165 } 165 }
166 166
167 @end 167 @end
OLDNEW
« no previous file with comments | « remoting/host/continue_window_linux.cc ('k') | remoting/host/continue_window_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698