| OLD | NEW |
| 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 #import <Carbon/Carbon.h> | 7 #import <Carbon/Carbon.h> |
| 8 #import <Foundation/NSAppleEventDescriptor.h> | 8 #import <Foundation/NSAppleEventDescriptor.h> |
| 9 | 9 |
| 10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 #include "content/public/browser/navigation_entry.h" | 22 #include "content/public/browser/navigation_entry.h" |
| 23 #include "content/public/browser/render_view_host.h" | 23 #include "content/public/browser/render_view_host.h" |
| 24 #include "content/public/browser/save_page_type.h" | 24 #include "content/public/browser/save_page_type.h" |
| 25 #include "content/public/browser/web_contents.h" | 25 #include "content/public/browser/web_contents.h" |
| 26 #include "content/public/browser/web_contents_delegate.h" | 26 #include "content/public/browser/web_contents_delegate.h" |
| 27 #include "googleurl/src/gurl.h" | 27 #include "googleurl/src/gurl.h" |
| 28 | 28 |
| 29 using content::NavigationController; | 29 using content::NavigationController; |
| 30 using content::NavigationEntry; | 30 using content::NavigationEntry; |
| 31 using content::OpenURLParams; | 31 using content::OpenURLParams; |
| 32 using content::RenderViewHost; |
| 32 using content::Referrer; | 33 using content::Referrer; |
| 33 using content::WebContents; | 34 using content::WebContents; |
| 34 | 35 |
| 35 @interface AnyResultValue : NSObject { | 36 @interface AnyResultValue : NSObject { |
| 36 @private | 37 @private |
| 37 scoped_nsobject<NSAppleEventDescriptor> descriptor; | 38 scoped_nsobject<NSAppleEventDescriptor> descriptor; |
| 38 } | 39 } |
| 39 - (id)initWithDescriptor:(NSAppleEventDescriptor*)desc; | 40 - (id)initWithDescriptor:(NSAppleEventDescriptor*)desc; |
| 40 - (NSAppleEventDescriptor *)scriptingAnyDescriptor; | 41 - (NSAppleEventDescriptor *)scriptingAnyDescriptor; |
| 41 @end | 42 @end |
| (...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 411 } | 412 } |
| 412 | 413 |
| 413 string16 script = base::SysNSStringToUTF16( | 414 string16 script = base::SysNSStringToUTF16( |
| 414 [[command evaluatedArguments] objectForKey:@"javascript"]); | 415 [[command evaluatedArguments] objectForKey:@"javascript"]); |
| 415 Value* value = view->ExecuteJavascriptAndGetValue(string16(), script); | 416 Value* value = view->ExecuteJavascriptAndGetValue(string16(), script); |
| 416 NSAppleEventDescriptor* descriptor = valueToDescriptor(value); | 417 NSAppleEventDescriptor* descriptor = valueToDescriptor(value); |
| 417 return [[[AnyResultValue alloc] initWithDescriptor:descriptor] autorelease]; | 418 return [[[AnyResultValue alloc] initWithDescriptor:descriptor] autorelease]; |
| 418 } | 419 } |
| 419 | 420 |
| 420 @end | 421 @end |
| OLD | NEW |