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

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

Issue 11583023: Give DisconnectWindow some TLC. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Replace DisconnectCallback with base::Closure Created 8 years 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/disconnect_window_gtk.cc ('k') | remoting/host/disconnect_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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <Cocoa/Cocoa.h> 5 #import <Cocoa/Cocoa.h>
6 6
7 #import "remoting/host/disconnect_window_mac.h" 7 #import "remoting/host/disconnect_window_mac.h"
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 22 matching lines...) Expand all
33 DisconnectWindowController* window_controller_; 33 DisconnectWindowController* window_controller_;
34 34
35 DISALLOW_COPY_AND_ASSIGN(DisconnectWindowMac); 35 DISALLOW_COPY_AND_ASSIGN(DisconnectWindowMac);
36 }; 36 };
37 37
38 DisconnectWindowMac::DisconnectWindowMac() 38 DisconnectWindowMac::DisconnectWindowMac()
39 : window_controller_(nil) { 39 : window_controller_(nil) {
40 } 40 }
41 41
42 DisconnectWindowMac::~DisconnectWindowMac() { 42 DisconnectWindowMac::~DisconnectWindowMac() {
43 [window_controller_ close]; 43 Hide();
44 } 44 }
45 45
46 bool DisconnectWindowMac::Show(const UiStrings& ui_strings, 46 bool DisconnectWindowMac::Show(const UiStrings& ui_strings,
47 const base::Closure& disconnect_callback, 47 const base::Closure& disconnect_callback,
48 const std::string& username) { 48 const std::string& username) {
49 DCHECK(!disconnect_callback.is_null()); 49 DCHECK(!disconnect_callback.is_null());
50 DCHECK(window_controller_ == nil); 50 DCHECK(window_controller_ == nil);
51 51
52 window_controller_ = 52 window_controller_ =
53 [[DisconnectWindowController alloc] initWithUiStrings:ui_strings 53 [[DisconnectWindowController alloc] initWithUiStrings:ui_strings
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 path = [NSBezierPath bezierPath]; 283 path = [NSBezierPath bezierPath];
284 [path moveToPoint:top]; 284 [path moveToPoint:top];
285 [path lineToPoint:bottom]; 285 [path lineToPoint:bottom];
286 [light setStroke]; 286 [light setStroke];
287 [path stroke]; 287 [path stroke];
288 288
289 [context setShouldAntialias:alias]; 289 [context setShouldAntialias:alias];
290 } 290 }
291 291
292 @end 292 @end
OLDNEW
« no previous file with comments | « remoting/host/disconnect_window_gtk.cc ('k') | remoting/host/disconnect_window_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698