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

Side by Side Diff: webkit/glue/webframeloaderclient_impl.cc

Issue 8186: Plumb the referrer throughout the OpenURL APIs.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 1 month 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 | « webkit/glue/glue_util.cc ('k') | webkit/glue/webview_delegate.h » ('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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 #include "config.h" 5 #include "config.h"
6 #include <string> 6 #include <string>
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 10
(...skipping 899 matching lines...) Expand 10 before | Expand all | Expand 10 after
910 910
911 disposition = d->DispositionForNavigationAction( 911 disposition = d->DispositionForNavigationAction(
912 wv, webframe_, &ds->GetRequest(), webnav_type, disposition, is_redirec t); 912 wv, webframe_, &ds->GetRequest(), webnav_type, disposition, is_redirec t);
913 913
914 if (disposition != IGNORE_ACTION) { 914 if (disposition != IGNORE_ACTION) {
915 if (disposition == CURRENT_TAB) { 915 if (disposition == CURRENT_TAB) {
916 policy_action = PolicyUse; 916 policy_action = PolicyUse;
917 } else if (disposition == SAVE_TO_DISK) { 917 } else if (disposition == SAVE_TO_DISK) {
918 policy_action = PolicyDownload; 918 policy_action = PolicyDownload;
919 } else { 919 } else {
920 GURL referrer = webkit_glue::StringToGURL(
921 request.httpHeaderField("Referer"));
922
920 d->OpenURL(webframe_->webview_impl(), 923 d->OpenURL(webframe_->webview_impl(),
921 webkit_glue::KURLToGURL(request.url()), 924 webkit_glue::KURLToGURL(request.url()),
925 referrer,
922 disposition); 926 disposition);
923 policy_action = PolicyIgnore; 927 policy_action = PolicyIgnore;
924 } 928 }
925 } else { 929 } else {
926 policy_action = PolicyIgnore; 930 policy_action = PolicyIgnore;
927 } 931 }
928 } 932 }
929 } else { 933 } else {
930 policy_action = PolicyIgnore; 934 policy_action = PolicyIgnore;
931 } 935 }
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after
1467 return false; 1471 return false;
1468 1472
1469 DCHECK(disposition); 1473 DCHECK(disposition);
1470 if (middle_or_ctrl) 1474 if (middle_or_ctrl)
1471 *disposition = shift ? NEW_FOREGROUND_TAB : NEW_BACKGROUND_TAB; 1475 *disposition = shift ? NEW_FOREGROUND_TAB : NEW_BACKGROUND_TAB;
1472 else 1476 else
1473 *disposition = shift ? NEW_WINDOW : SAVE_TO_DISK; 1477 *disposition = shift ? NEW_WINDOW : SAVE_TO_DISK;
1474 return true; 1478 return true;
1475 } 1479 }
1476 1480
OLDNEW
« no previous file with comments | « webkit/glue/glue_util.cc ('k') | webkit/glue/webview_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698