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

Side by Side Diff: content/browser/tab_contents/tab_contents.cc

Issue 8774041: Upgrade all call sites of PageNavigator::OpenURL that pass a referrer to use OpenURLParams (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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/cocoa/applescript/tab_applescript.mm ('k') | no next file » | 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 #include "content/browser/tab_contents/tab_contents.h" 5 #include "content/browser/tab_contents/tab_contents.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 return notify_disconnection() && 566 return notify_disconnection() &&
567 !showing_interstitial_page() && 567 !showing_interstitial_page() &&
568 !render_view_host()->SuddenTerminationAllowed(); 568 !render_view_host()->SuddenTerminationAllowed();
569 } 569 }
570 570
571 // TODO(adriansc): Remove this method once refactoring changed all call sites. 571 // TODO(adriansc): Remove this method once refactoring changed all call sites.
572 TabContents* TabContents::OpenURL(const GURL& url, 572 TabContents* TabContents::OpenURL(const GURL& url,
573 const GURL& referrer, 573 const GURL& referrer,
574 WindowOpenDisposition disposition, 574 WindowOpenDisposition disposition,
575 content::PageTransition transition) { 575 content::PageTransition transition) {
576 // For specifying a referrer, use the version of OpenURL taking OpenURLParams.
577 DCHECK(referrer.is_empty());
576 return OpenURL(OpenURLParams(url, referrer, disposition, transition, 578 return OpenURL(OpenURLParams(url, referrer, disposition, transition,
577 false)); 579 false));
578 } 580 }
579 581
580 TabContents* TabContents::OpenURL(const OpenURLParams& params) { 582 TabContents* TabContents::OpenURL(const OpenURLParams& params) {
581 if (delegate_) { 583 if (delegate_) {
582 TabContents* new_contents = delegate_->OpenURLFromTab(this, params); 584 TabContents* new_contents = delegate_->OpenURLFromTab(this, params);
583 // Notify observers. 585 // Notify observers.
584 FOR_EACH_OBSERVER(TabContentsObserver, observers_, 586 FOR_EACH_OBSERVER(TabContentsObserver, observers_,
585 DidOpenURL(params.url, params.referrer, 587 DidOpenURL(params.url, params.referrer,
(...skipping 1470 matching lines...) Expand 10 before | Expand all | Expand 10 after
2056 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh); 2058 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh);
2057 // Can be NULL during tests. 2059 // Can be NULL during tests.
2058 if (rwh_view) 2060 if (rwh_view)
2059 rwh_view->SetSize(view()->GetContainerSize()); 2061 rwh_view->SetSize(view()->GetContainerSize());
2060 } 2062 }
2061 2063
2062 bool TabContents::GotResponseToLockMouseRequest(bool allowed) { 2064 bool TabContents::GotResponseToLockMouseRequest(bool allowed) {
2063 return render_view_host() ? 2065 return render_view_host() ?
2064 render_view_host()->GotResponseToLockMouseRequest(allowed) : false; 2066 render_view_host()->GotResponseToLockMouseRequest(allowed) : false;
2065 } 2067 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/applescript/tab_applescript.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698