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

Side by Side Diff: chrome/browser/sessions/session_restore_android.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, 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/sessions/session_restore.h" 5 #include "chrome/browser/sessions/session_restore.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "chrome/browser/android/tab_android.h" 9 #include "chrome/browser/android/tab_android.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 24 matching lines...) Expand all
35 content::WebContents::CreateParams(context)); 35 content::WebContents::CreateParams(context));
36 int selected_index = session_tab.normalized_navigation_index(); 36 int selected_index = session_tab.normalized_navigation_index();
37 new_web_contents->GetController().Restore( 37 new_web_contents->GetController().Restore(
38 selected_index, 38 selected_index,
39 content::NavigationController::RESTORE_LAST_SESSION_EXITED_CLEANLY, 39 content::NavigationController::RESTORE_LAST_SESSION_EXITED_CLEANLY,
40 &entries); 40 &entries);
41 41
42 TabAndroid* current_tab = TabAndroid::FromWebContents(web_contents); 42 TabAndroid* current_tab = TabAndroid::FromWebContents(web_contents);
43 DCHECK(current_tab); 43 DCHECK(current_tab);
44 if (disposition == CURRENT_TAB) { 44 if (disposition == CURRENT_TAB) {
45 current_tab->SwapTabContents(web_contents, new_web_contents); 45 current_tab->SwapTabContents(web_contents, new_web_contents, false);
Ted C 2014/01/28 18:11:44 Previously, this wasn't resulting in a page load s
Shuhei Takahashi (google) 2014/01/29 05:58:10 Added another boolean flag didStartLoad to disting
46 delete web_contents; 46 delete web_contents;
47 } else { 47 } else {
48 DCHECK(disposition == NEW_FOREGROUND_TAB || 48 DCHECK(disposition == NEW_FOREGROUND_TAB ||
49 disposition == NEW_BACKGROUND_TAB); 49 disposition == NEW_BACKGROUND_TAB);
50 tab_model->CreateTab(new_web_contents, current_tab->GetAndroidId()); 50 tab_model->CreateTab(new_web_contents, current_tab->GetAndroidId());
51 } 51 }
52 return new_web_contents; 52 return new_web_contents;
53 } 53 }
54 54
55 // static 55 // static
56 std::vector<Browser*> SessionRestore::RestoreForeignSessionWindows( 56 std::vector<Browser*> SessionRestore::RestoreForeignSessionWindows(
57 Profile* profile, 57 Profile* profile,
58 chrome::HostDesktopType host_desktop_type, 58 chrome::HostDesktopType host_desktop_type,
59 std::vector<const SessionWindow*>::const_iterator begin, 59 std::vector<const SessionWindow*>::const_iterator begin,
60 std::vector<const SessionWindow*>::const_iterator end) { 60 std::vector<const SessionWindow*>::const_iterator end) {
61 NOTREACHED(); 61 NOTREACHED();
62 return std::vector<Browser*>(); 62 return std::vector<Browser*>();
63 } 63 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698