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

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

Issue 6312154: Remove wstring from RVH's run Javascript command.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/scoped_nsobject.h" 9 #import "base/scoped_nsobject.h"
10 #include "base/sys_string_conversions.h" 10 #include "base/sys_string_conversions.h"
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 } 278 }
279 } 279 }
280 280
281 - (id)handlesExecuteJavascriptScriptCommand:(NSScriptCommand*)command { 281 - (id)handlesExecuteJavascriptScriptCommand:(NSScriptCommand*)command {
282 RenderViewHost* view = tabContents_->render_view_host(); 282 RenderViewHost* view = tabContents_->render_view_host();
283 if (!view) { 283 if (!view) {
284 NOTREACHED(); 284 NOTREACHED();
285 return nil; 285 return nil;
286 } 286 }
287 287
288 std::wstring script = base::SysNSStringToWide( 288 string16 script = base::SysNSStringToUTF16(
289 [[command evaluatedArguments] objectForKey:@"javascript"]); 289 [[command evaluatedArguments] objectForKey:@"javascript"]);
290 view->ExecuteJavascriptInWebFrame(L"", script); 290 view->ExecuteJavascriptInWebFrame(string16(), script);
291 291
292 // TODO(Shreyas): Figure out a way to get the response back. 292 // TODO(Shreyas): Figure out a way to get the response back.
293 return nil; 293 return nil;
294 } 294 }
295 295
296 @end 296 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698