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

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

Issue 9967006: Check host_ is not NULL in isRToL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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 | « no previous file | no next file » | 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698