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

Side by Side Diff: chrome/browser/ui/browser.cc

Issue 8861001: Merge 113161 - Update CreateTabContents to use a content::Referrer instead of a plain URL (Closed) Base URL: svn://svn.chromium.org/chrome/branches/963/src/
Patch Set: 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
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 "chrome/browser/ui/browser.h" 5 #include "chrome/browser/ui/browser.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #include <shellapi.h> 9 #include <shellapi.h>
10 #endif // OS_WIN 10 #endif // OS_WIN
(...skipping 3033 matching lines...) Expand 10 before | Expand all | Expand 10 after
3044 browser->LoadingStateChanged(detached_contents->tab_contents()); 3044 browser->LoadingStateChanged(detached_contents->tab_contents());
3045 return browser; 3045 return browser;
3046 } 3046 }
3047 3047
3048 int Browser::GetDragActions() const { 3048 int Browser::GetDragActions() const {
3049 return TabStripModelDelegate::TAB_TEAROFF_ACTION | (tab_count() > 1 ? 3049 return TabStripModelDelegate::TAB_TEAROFF_ACTION | (tab_count() > 1 ?
3050 TabStripModelDelegate::TAB_MOVE_ACTION : 0); 3050 TabStripModelDelegate::TAB_MOVE_ACTION : 0);
3051 } 3051 }
3052 3052
3053 TabContentsWrapper* Browser::CreateTabContentsForURL( 3053 TabContentsWrapper* Browser::CreateTabContentsForURL(
3054 const GURL& url, const GURL& referrer, Profile* profile, 3054 const GURL& url, const content::Referrer& referrer, Profile* profile,
3055 content::PageTransition transition, bool defer_load, 3055 content::PageTransition transition, bool defer_load,
3056 SiteInstance* instance) const { 3056 SiteInstance* instance) const {
3057 TabContentsWrapper* contents = TabContentsFactory(profile, instance, 3057 TabContentsWrapper* contents = TabContentsFactory(profile, instance,
3058 MSG_ROUTING_NONE, 3058 MSG_ROUTING_NONE,
3059 GetSelectedTabContents(), NULL); 3059 GetSelectedTabContents(), NULL);
3060 if (!defer_load) { 3060 if (!defer_load) {
3061 // Load the initial URL before adding the new tab contents to the tab strip 3061 // Load the initial URL before adding the new tab contents to the tab strip
3062 // so that the tab contents has navigation state. 3062 // so that the tab contents has navigation state.
3063 contents->controller().LoadURL( 3063 contents->controller().LoadURL(url, referrer, transition, std::string());
3064 url,
3065 content::Referrer(referrer, WebKit::WebReferrerPolicyDefault),
3066 transition,
3067 std::string());
3068 } 3064 }
3069 3065
3070 return contents; 3066 return contents;
3071 } 3067 }
3072 3068
3073 bool Browser::CanDuplicateContentsAt(int index) { 3069 bool Browser::CanDuplicateContentsAt(int index) {
3074 NavigationController& nc = GetTabContentsAt(index)->controller(); 3070 NavigationController& nc = GetTabContentsAt(index)->controller();
3075 return nc.tab_contents() && nc.GetLastCommittedEntry(); 3071 return nc.tab_contents() && nc.GetLastCommittedEntry();
3076 } 3072 }
3077 3073
(...skipping 2249 matching lines...) Expand 10 before | Expand all | Expand 10 after
5327 window_->GetLocationBar()->ShowFirstRunBubble(bubble_type); 5323 window_->GetLocationBar()->ShowFirstRunBubble(bubble_type);
5328 } else { 5324 } else {
5329 GlobalErrorService* service = 5325 GlobalErrorService* service =
5330 GlobalErrorServiceFactory::GetForProfile(profile()); 5326 GlobalErrorServiceFactory::GetForProfile(profile());
5331 GlobalError* error = service->GetFirstGlobalErrorWithBubbleView(); 5327 GlobalError* error = service->GetFirstGlobalErrorWithBubbleView();
5332 if (error) { 5328 if (error) {
5333 error->ShowBubbleView(this); 5329 error->ShowBubbleView(this);
5334 } 5330 }
5335 } 5331 }
5336 } 5332 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/cocoa/tabs/tab_strip_controller_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698