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

Side by Side Diff: chrome/browser/ui/cocoa/applescript/tab_applescript.mm

Issue 6901003: Revert my recent changes regarding title directionality. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: copyrights Created 9 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 | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/toolbar/back_forward_menu_model.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/ui/cocoa/applescript/tab_applescript.h" 5 #import "chrome/browser/ui/cocoa/applescript/tab_applescript.h"
6 6
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #import "base/memory/scoped_nsobject.h" 9 #import "base/memory/scoped_nsobject.h"
10 #include "base/sys_string_conversions.h" 10 #include "base/sys_string_conversions.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 CURRENT_TAB, 118 CURRENT_TAB,
119 PageTransition::TYPED); 119 PageTransition::TYPED);
120 } 120 }
121 121
122 - (NSString*)title { 122 - (NSString*)title {
123 NavigationEntry* entry = tabContents_->controller().GetActiveEntry(); 123 NavigationEntry* entry = tabContents_->controller().GetActiveEntry();
124 if (!entry) 124 if (!entry)
125 return nil; 125 return nil;
126 126
127 std::wstring title; 127 std::wstring title;
128 // TODO(evan): use directionality of title. 128 if (entry != NULL) {
129 // http://code.google.com/p/chromium/issues/detail?id=27094 129 title = UTF16ToWideHack(entry->title());
130 if (entry != NULL) 130 }
131 title = UTF16ToWideHack(entry->title().string());
132 131
133 return base::SysWideToNSString(title); 132 return base::SysWideToNSString(title);
134 } 133 }
135 134
136 - (NSNumber*)loading { 135 - (NSNumber*)loading {
137 BOOL loadingValue = tabContents_->tab_contents()->is_loading() ? YES : NO; 136 BOOL loadingValue = tabContents_->tab_contents()->is_loading() ? YES : NO;
138 return [NSNumber numberWithBool:loadingValue]; 137 return [NSNumber numberWithBool:loadingValue];
139 } 138 }
140 139
141 - (void)handlesUndoScriptCommand:(NSScriptCommand*)command { 140 - (void)handlesUndoScriptCommand:(NSScriptCommand*)command {
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 294
296 string16 script = base::SysNSStringToUTF16( 295 string16 script = base::SysNSStringToUTF16(
297 [[command evaluatedArguments] objectForKey:@"javascript"]); 296 [[command evaluatedArguments] objectForKey:@"javascript"]);
298 view->ExecuteJavascriptInWebFrame(string16(), script); 297 view->ExecuteJavascriptInWebFrame(string16(), script);
299 298
300 // TODO(Shreyas): Figure out a way to get the response back. 299 // TODO(Shreyas): Figure out a way to get the response back.
301 return nil; 300 return nil;
302 } 301 }
303 302
304 @end 303 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/toolbar/back_forward_menu_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698