OLD | NEW |
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 3038 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3049 TabContentsWrapper* Browser::CreateTabContentsForURL( | 3049 TabContentsWrapper* Browser::CreateTabContentsForURL( |
3050 const GURL& url, const GURL& referrer, Profile* profile, | 3050 const GURL& url, const GURL& referrer, Profile* profile, |
3051 content::PageTransition transition, bool defer_load, | 3051 content::PageTransition transition, bool defer_load, |
3052 SiteInstance* instance) const { | 3052 SiteInstance* instance) const { |
3053 TabContentsWrapper* contents = TabContentsFactory(profile, instance, | 3053 TabContentsWrapper* contents = TabContentsFactory(profile, instance, |
3054 MSG_ROUTING_NONE, | 3054 MSG_ROUTING_NONE, |
3055 GetSelectedTabContents(), NULL); | 3055 GetSelectedTabContents(), NULL); |
3056 if (!defer_load) { | 3056 if (!defer_load) { |
3057 // Load the initial URL before adding the new tab contents to the tab strip | 3057 // Load the initial URL before adding the new tab contents to the tab strip |
3058 // so that the tab contents has navigation state. | 3058 // so that the tab contents has navigation state. |
3059 contents->controller().LoadURL(url, referrer, transition, std::string()); | 3059 contents->controller().LoadURL( |
| 3060 url, |
| 3061 content::Referrer(referrer, WebKit::WebReferrerPolicyDefault), |
| 3062 transition, |
| 3063 std::string()); |
3060 } | 3064 } |
3061 | 3065 |
3062 return contents; | 3066 return contents; |
3063 } | 3067 } |
3064 | 3068 |
3065 bool Browser::CanDuplicateContentsAt(int index) { | 3069 bool Browser::CanDuplicateContentsAt(int index) { |
3066 NavigationController& nc = GetTabContentsAt(index)->controller(); | 3070 NavigationController& nc = GetTabContentsAt(index)->controller(); |
3067 return nc.tab_contents() && nc.GetLastCommittedEntry(); | 3071 return nc.tab_contents() && nc.GetLastCommittedEntry(); |
3068 } | 3072 } |
3069 | 3073 |
(...skipping 2249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5319 window_->GetLocationBar()->ShowFirstRunBubble(bubble_type); | 5323 window_->GetLocationBar()->ShowFirstRunBubble(bubble_type); |
5320 } else { | 5324 } else { |
5321 GlobalErrorService* service = | 5325 GlobalErrorService* service = |
5322 GlobalErrorServiceFactory::GetForProfile(profile()); | 5326 GlobalErrorServiceFactory::GetForProfile(profile()); |
5323 GlobalError* error = service->GetFirstGlobalErrorWithBubbleView(); | 5327 GlobalError* error = service->GetFirstGlobalErrorWithBubbleView(); |
5324 if (error) { | 5328 if (error) { |
5325 error->ShowBubbleView(this); | 5329 error->ShowBubbleView(this); |
5326 } | 5330 } |
5327 } | 5331 } |
5328 } | 5332 } |
OLD | NEW |