| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |