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

Side by Side Diff: remoting/host/it2me/it2me_confirmation_dialog_mac.mm

Issue 2650443002: Webapp share dialog is not closed when client end of the connection is closed (Closed)
Patch Set: Merging changes from dependent CL Created 3 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/it2me/it2me_confirmation_dialog.h" 5 #include "remoting/host/it2me/it2me_confirmation_dialog.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 8
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 base::mac::ScopedNSAutoreleasePool pool; 103 base::mac::ScopedNSAutoreleasePool pool;
104 [controller_ hide]; 104 [controller_ hide];
105 controller_.reset(); 105 controller_.reset();
106 } 106 }
107 107
108 if (result_callback_) { 108 if (result_callback_) {
109 base::ResetAndReturn(&result_callback_).Run(result); 109 base::ResetAndReturn(&result_callback_).Run(result);
110 } 110 }
111 } 111 }
112 112
113 // static 113 std::unique_ptr<It2MeConfirmationDialog>
114 std::unique_ptr<It2MeConfirmationDialog> It2MeConfirmationDialog::Create() { 114 It2MeConfirmationDialogFactory::Create() {
115 return base::MakeUnique<It2MeConfirmationDialogMac>(); 115 return base::MakeUnique<It2MeConfirmationDialogMac>();
116 } 116 }
117 117
118 } // namespace remoting 118 } // namespace remoting
119 119
120 @implementation It2MeConfirmationDialogMacController 120 @implementation It2MeConfirmationDialogMacController
121 121
122 - (id)initWithCallback: 122 - (id)initWithCallback:
123 (const remoting::It2MeConfirmationDialog::ResultCallback&)callback 123 (const remoting::It2MeConfirmationDialog::ResultCallback&)callback
124 username:(const std::string&)username { 124 username:(const std::string&)username {
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 181
182 - (void)onAccept:(id)sender { 182 - (void)onAccept:(id)sender {
183 [self hide]; 183 [self hide];
184 if (dialog_action_callback_) { 184 if (dialog_action_callback_) {
185 base::ResetAndReturn(&dialog_action_callback_) 185 base::ResetAndReturn(&dialog_action_callback_)
186 .Run(remoting::It2MeConfirmationDialog::Result::OK); 186 .Run(remoting::It2MeConfirmationDialog::Result::OK);
187 } 187 }
188 } 188 }
189 189
190 @end 190 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698