| 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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 return; | 208 return; |
| 209 } | 209 } |
| 210 | 210 |
| 211 NavigationEntry* entry = tabContents_->controller().GetActiveEntry(); | 211 NavigationEntry* entry = tabContents_->controller().GetActiveEntry(); |
| 212 if (!entry) | 212 if (!entry) |
| 213 return; | 213 return; |
| 214 | 214 |
| 215 const GURL& previousURL = entry->virtual_url(); | 215 const GURL& previousURL = entry->virtual_url(); |
| 216 tabContents_->tab_contents()->OpenURL(OpenURLParams( | 216 tabContents_->tab_contents()->OpenURL(OpenURLParams( |
| 217 url, | 217 url, |
| 218 previousURL, | 218 content::Referrer(previousURL, WebKit::WebReferrerPolicyDefault), |
| 219 CURRENT_TAB, | 219 CURRENT_TAB, |
| 220 content::PAGE_TRANSITION_TYPED, | 220 content::PAGE_TRANSITION_TYPED, |
| 221 false)); | 221 false)); |
| 222 } | 222 } |
| 223 | 223 |
| 224 - (NSString*)title { | 224 - (NSString*)title { |
| 225 NavigationEntry* entry = tabContents_->controller().GetActiveEntry(); | 225 NavigationEntry* entry = tabContents_->controller().GetActiveEntry(); |
| 226 if (!entry) | 226 if (!entry) |
| 227 return nil; | 227 return nil; |
| 228 | 228 |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 399 } | 399 } |
| 400 | 400 |
| 401 string16 script = base::SysNSStringToUTF16( | 401 string16 script = base::SysNSStringToUTF16( |
| 402 [[command evaluatedArguments] objectForKey:@"javascript"]); | 402 [[command evaluatedArguments] objectForKey:@"javascript"]); |
| 403 Value* value = view->ExecuteJavascriptAndGetValue(string16(), script); | 403 Value* value = view->ExecuteJavascriptAndGetValue(string16(), script); |
| 404 NSAppleEventDescriptor* descriptor = valueToDescriptor(value); | 404 NSAppleEventDescriptor* descriptor = valueToDescriptor(value); |
| 405 return [[[AnyResultValue alloc] initWithDescriptor:descriptor] autorelease]; | 405 return [[[AnyResultValue alloc] initWithDescriptor:descriptor] autorelease]; |
| 406 } | 406 } |
| 407 | 407 |
| 408 @end | 408 @end |
| OLD | NEW |