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

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: sync Created 6 years, 10 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
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/tab_contents/core_tab_helper_delegate.h » ('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 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_start_load,
1710 bool did_finish_load) {
1709 int index = tab_strip_model_->GetIndexOfWebContents(old_contents); 1711 int index = tab_strip_model_->GetIndexOfWebContents(old_contents);
1710 DCHECK_NE(TabStripModel::kNoTab, index); 1712 DCHECK_NE(TabStripModel::kNoTab, index);
1711 tab_strip_model_->ReplaceWebContentsAt(index, new_contents); 1713 tab_strip_model_->ReplaceWebContentsAt(index, new_contents);
1712 } 1714 }
1713 1715
1714 bool Browser::CanReloadContents(content::WebContents* web_contents) const { 1716 bool Browser::CanReloadContents(content::WebContents* web_contents) const {
1715 return chrome::CanReload(this); 1717 return chrome::CanReload(this);
1716 } 1718 }
1717 1719
1718 bool Browser::CanSaveContents(content::WebContents* web_contents) const { 1720 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) { 2295 if (contents && !allow_js_access) {
2294 contents->web_contents()->GetController().LoadURL( 2296 contents->web_contents()->GetController().LoadURL(
2295 target_url, 2297 target_url,
2296 content::Referrer(), 2298 content::Referrer(),
2297 content::PAGE_TRANSITION_LINK, 2299 content::PAGE_TRANSITION_LINK,
2298 std::string()); // No extra headers. 2300 std::string()); // No extra headers.
2299 } 2301 }
2300 2302
2301 return contents != NULL; 2303 return contents != NULL;
2302 } 2304 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/tab_contents/core_tab_helper_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698