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

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: Add a swap 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::ShiftHistory(int history_length) {
600 RenderViewHost* rvh = render_view_host();
601 if (!rvh)
602 return;
603 rvh->Send(new ViewMsg_ShiftHistory(rvh->routing_id(), history_length));
604 }
605
599 void TabContents::Stop() { 606 void TabContents::Stop() {
600 render_manager_.Stop(); 607 render_manager_.Stop();
601 FOR_EACH_OBSERVER(TabContentsObserver, observers_, StopNavigation()); 608 FOR_EACH_OBSERVER(TabContentsObserver, observers_, StopNavigation());
602 } 609 }
603 610
604 TabContents* TabContents::Clone() { 611 TabContents* TabContents::Clone() {
605 // We create a new SiteInstance so that the new tab won't share processes 612 // 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 613 // with the old one. This can be changed in the future if we need it to share
607 // processes for some reason. 614 // processes for some reason.
608 TabContents* tc = new TabContents( 615 TabContents* tc = new TabContents(
(...skipping 1295 matching lines...) Expand 10 before | Expand all | Expand 10 after
1904 } 1911 }
1905 1912
1906 void TabContents::SwapInRenderViewHost(RenderViewHost* rvh) { 1913 void TabContents::SwapInRenderViewHost(RenderViewHost* rvh) {
1907 render_manager_.SwapInRenderViewHost(rvh); 1914 render_manager_.SwapInRenderViewHost(rvh);
1908 } 1915 }
1909 1916
1910 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { 1917 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) {
1911 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh); 1918 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh);
1912 rwh_view->SetSize(view()->GetContainerSize()); 1919 rwh_view->SetSize(view()->GetContainerSize());
1913 } 1920 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698