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

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

Issue 7491096: Fix regression with back-button not working on prerendered and instant pages. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comment change Created 9 years, 4 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 | 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 "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 578 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 FOR_EACH_OBSERVER(TabContentsObserver, 589 FOR_EACH_OBSERVER(TabContentsObserver,
590 observers_, 590 observers_,
591 NavigateToPendingEntry(entry.url(), reload_type)); 591 NavigateToPendingEntry(entry.url(), reload_type));
592 592
593 if (delegate_) 593 if (delegate_)
594 delegate_->DidNavigateToPendingEntry(this); 594 delegate_->DidNavigateToPendingEntry(this);
595 595
596 return true; 596 return true;
597 } 597 }
598 598
599 void TabContents::SetHistoryLengthAndClear(int history_length) {
600 RenderViewHost* rvh = render_view_host();
Charlie Reis 2011/08/09 20:59:31 This concerns me because a TabContents can have mu
cbentzel 2011/08/09 22:22:15 Is there a way to retrieve whether a NavigationEnt
Charlie Reis 2011/08/09 22:51:42 Yes-- you can compare the SiteInstance of the Navi
Charlie Reis 2011/08/09 23:25:16 Please remember this for the followup CL. (Maybe
601 if (!rvh)
602 return;
603 rvh->Send(new ViewMsg_SetHistoryLengthAndClear(rvh->routing_id(),
604 history_length));
605 }
606
599 void TabContents::Stop() { 607 void TabContents::Stop() {
600 render_manager_.Stop(); 608 render_manager_.Stop();
601 FOR_EACH_OBSERVER(TabContentsObserver, observers_, StopNavigation()); 609 FOR_EACH_OBSERVER(TabContentsObserver, observers_, StopNavigation());
602 } 610 }
603 611
604 TabContents* TabContents::Clone() { 612 TabContents* TabContents::Clone() {
605 // We create a new SiteInstance so that the new tab won't share processes 613 // We create a new SiteInstance so that the new tab won't share processes
606 // with the old one. This can be changed in the future if we need it to share 614 // with the old one. This can be changed in the future if we need it to share
607 // processes for some reason. 615 // processes for some reason.
608 TabContents* tc = new TabContents( 616 TabContents* tc = new TabContents(
(...skipping 1295 matching lines...) Expand 10 before | Expand all | Expand 10 after
1904 } 1912 }
1905 1913
1906 void TabContents::SwapInRenderViewHost(RenderViewHost* rvh) { 1914 void TabContents::SwapInRenderViewHost(RenderViewHost* rvh) {
1907 render_manager_.SwapInRenderViewHost(rvh); 1915 render_manager_.SwapInRenderViewHost(rvh);
1908 } 1916 }
1909 1917
1910 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { 1918 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) {
1911 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh); 1919 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh);
1912 rwh_view->SetSize(view()->GetContainerSize()); 1920 rwh_view->SetSize(view()->GetContainerSize());
1913 } 1921 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698