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

Side by Side Diff: chrome/browser/web_contents.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 | « chrome/browser/web_contents.h ('k') | chrome/browser/web_contents_unittest.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) 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 "chrome/browser/web_contents.h" 5 #include "chrome/browser/web_contents.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/file_version_info.h" 9 #include "base/file_version_info.h"
10 #include "base/process_util.h" 10 #include "base/process_util.h"
(...skipping 958 matching lines...) Expand 10 before | Expand all | Expand 10 after
969 // request. If we end up with another place invoking DownloadImage, probably 969 // request. If we end up with another place invoking DownloadImage, probably
970 // best to refactor out into notification service, or something similar. 970 // best to refactor out into notification service, or something similar.
971 if (errored) 971 if (errored)
972 fav_icon_helper_.FavIconDownloadFailed(id); 972 fav_icon_helper_.FavIconDownloadFailed(id);
973 else 973 else
974 fav_icon_helper_.SetFavIcon(id, image_url, image); 974 fav_icon_helper_.SetFavIcon(id, image_url, image);
975 if (web_app_.get() && !errored) 975 if (web_app_.get() && !errored)
976 web_app_->SetImage(image_url, image); 976 web_app_->SetImage(image_url, image);
977 } 977 }
978 978
979 void WebContents::RequestOpenURL(const GURL& url, 979 void WebContents::RequestOpenURL(const GURL& url, const GURL& referrer,
980 WindowOpenDisposition disposition) { 980 WindowOpenDisposition disposition) {
981 OpenURL(url, disposition, PageTransition::LINK); 981 OpenURL(url, referrer, disposition, PageTransition::LINK);
982 } 982 }
983 983
984 void WebContents::DomOperationResponse(const std::string& json_string, 984 void WebContents::DomOperationResponse(const std::string& json_string,
985 int automation_id) { 985 int automation_id) {
986 DomOperationNotificationDetails details(json_string, automation_id); 986 DomOperationNotificationDetails details(json_string, automation_id);
987 NotificationService::current()->Notify( 987 NotificationService::current()->Notify(
988 NOTIFY_DOM_OPERATION_RESPONSE, Source<WebContents>(this), 988 NOTIFY_DOM_OPERATION_RESPONSE, Source<WebContents>(this),
989 Details<DomOperationNotificationDetails>(&details)); 989 Details<DomOperationNotificationDetails>(&details));
990 } 990 }
991 991
(...skipping 758 matching lines...) Expand 10 before | Expand all | Expand 10 after
1750 // The favicon url isn't valid. This means there really isn't a favicon, 1750 // The favicon url isn't valid. This means there really isn't a favicon,
1751 // or the favicon url wasn't obtained before the load started. This assumes 1751 // or the favicon url wasn't obtained before the load started. This assumes
1752 // the later. 1752 // the later.
1753 // TODO(sky): Need a way to set the favicon that doesn't involve generating 1753 // TODO(sky): Need a way to set the favicon that doesn't involve generating
1754 // its url. 1754 // its url.
1755 new_url->SetFavIconURL(TemplateURL::GenerateFaviconURL(params.referrer)); 1755 new_url->SetFavIconURL(TemplateURL::GenerateFaviconURL(params.referrer));
1756 } 1756 }
1757 new_url->set_safe_for_autoreplace(true); 1757 new_url->set_safe_for_autoreplace(true);
1758 url_model->Add(new_url); 1758 url_model->Add(new_url);
1759 } 1759 }
OLDNEW
« no previous file with comments | « chrome/browser/web_contents.h ('k') | chrome/browser/web_contents_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698