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