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

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

Issue 143463012: Pass rendering state on swapping in a prerendered page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dev
Patch Set: . Created 6 years, 11 months 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 // defined(OS_WIN) 10 #endif // defined(OS_WIN)
(...skipping 1687 matching lines...) Expand 10 before | Expand all | Expand 10 after
1698 size.Enlarge( 1698 size.Enlarge(
1699 0, window()->GetRenderViewHeightInsetWithDetachedBookmarkBar()); 1699 0, window()->GetRenderViewHeightInsetWithDetachedBookmarkBar());
1700 } 1700 }
1701 return size; 1701 return size;
1702 } 1702 }
1703 1703
1704 /////////////////////////////////////////////////////////////////////////////// 1704 ///////////////////////////////////////////////////////////////////////////////
1705 // Browser, CoreTabHelperDelegate implementation: 1705 // Browser, CoreTabHelperDelegate implementation:
1706 1706
1707 void Browser::SwapTabContents(content::WebContents* old_contents, 1707 void Browser::SwapTabContents(content::WebContents* old_contents,
1708 content::WebContents* new_contents) { 1708 content::WebContents* new_contents,
1709 bool did_finish_load) {
1709 int index = tab_strip_model_->GetIndexOfWebContents(old_contents); 1710 int index = tab_strip_model_->GetIndexOfWebContents(old_contents);
1710 DCHECK_NE(TabStripModel::kNoTab, index); 1711 DCHECK_NE(TabStripModel::kNoTab, index);
1711 tab_strip_model_->ReplaceWebContentsAt(index, new_contents); 1712 tab_strip_model_->ReplaceWebContentsAt(index, new_contents);
1712 } 1713 }
1713 1714
1714 bool Browser::CanReloadContents(content::WebContents* web_contents) const { 1715 bool Browser::CanReloadContents(content::WebContents* web_contents) const {
1715 return chrome::CanReload(this); 1716 return chrome::CanReload(this);
1716 } 1717 }
1717 1718
1718 bool Browser::CanSaveContents(content::WebContents* web_contents) const { 1719 bool Browser::CanSaveContents(content::WebContents* web_contents) const {
(...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after
2293 if (contents && !allow_js_access) { 2294 if (contents && !allow_js_access) {
2294 contents->web_contents()->GetController().LoadURL( 2295 contents->web_contents()->GetController().LoadURL(
2295 target_url, 2296 target_url,
2296 content::Referrer(), 2297 content::Referrer(),
2297 content::PAGE_TRANSITION_LINK, 2298 content::PAGE_TRANSITION_LINK,
2298 std::string()); // No extra headers. 2299 std::string()); // No extra headers.
2299 } 2300 }
2300 2301
2301 return contents != NULL; 2302 return contents != NULL;
2302 } 2303 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698