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

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

Issue 8784006: Replace the GURL referrer field of OpenURLParams with a content::Referrer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 9 years 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/gtk/about_chrome_dialog.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 #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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/gtk/about_chrome_dialog.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698