| 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 } | 89 } |
| 90 | 90 |
| 91 - (IBAction)stopSharing:(id)sender { | 91 - (IBAction)stopSharing:(id)sender { |
| 92 if (self.host) { | 92 if (self.host) { |
| 93 self.host->Shutdown(base::Closure()); | 93 self.host->Shutdown(base::Closure()); |
| 94 self.host = NULL; | 94 self.host = NULL; |
| 95 } | 95 } |
| 96 } | 96 } |
| 97 | 97 |
| 98 - (BOOL)isRToL { | 98 - (BOOL)isRToL { |
| 99 return host_->ui_strings().direction == remoting::UiStrings::RTL; | 99 if (host_) { |
| 100 return host_->ui_strings().direction == remoting::UiStrings::RTL; |
| 101 } else { |
| 102 return false; |
| 103 } |
| 100 } | 104 } |
| 101 | 105 |
| 102 - (void)close { | 106 - (void)close { |
| 103 self.host = NULL; | 107 self.host = NULL; |
| 104 [super close]; | 108 [super close]; |
| 105 } | 109 } |
| 106 | 110 |
| 107 - (void)windowDidLoad { | 111 - (void)windowDidLoad { |
| 108 string16 text = ReplaceStringPlaceholders( | 112 string16 text = ReplaceStringPlaceholders( |
| 109 host_->ui_strings().disconnect_message, | 113 host_->ui_strings().disconnect_message, |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 path = [NSBezierPath bezierPath]; | 289 path = [NSBezierPath bezierPath]; |
| 286 [path moveToPoint:top]; | 290 [path moveToPoint:top]; |
| 287 [path lineToPoint:bottom]; | 291 [path lineToPoint:bottom]; |
| 288 [light setStroke]; | 292 [light setStroke]; |
| 289 [path stroke]; | 293 [path stroke]; |
| 290 | 294 |
| 291 [context setShouldAntialias:alias]; | 295 [context setShouldAntialias:alias]; |
| 292 } | 296 } |
| 293 | 297 |
| 294 @end | 298 @end |
| OLD | NEW |