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

Side by Side Diff: chrome/browser/sessions/tab_loader.h

Issue 1130673003: Make session restore forced tab load delay Finch configurable, and separate first tab loads from su… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleaned up comments. Created 5 years, 7 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 | « no previous file | chrome/browser/sessions/tab_loader.cc » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef CHROME_BROWSER_SESSIONS_TAB_LOADER_H_ 5 #ifndef CHROME_BROWSER_SESSIONS_TAB_LOADER_H_
6 #define CHROME_BROWSER_SESSIONS_TAB_LOADER_H_ 6 #define CHROME_BROWSER_SESSIONS_TAB_LOADER_H_
7 7
8 #include <list> 8 #include <list>
9 #include <set> 9 #include <set>
10 10
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 explicit TabLoader(base::TimeTicks restore_started); 61 explicit TabLoader(base::TimeTicks restore_started);
62 ~TabLoader() override; 62 ~TabLoader() override;
63 63
64 // This is invoked once by RestoreTabs to start loading. 64 // This is invoked once by RestoreTabs to start loading.
65 void StartLoading(const std::vector<RestoredTab>& tabs); 65 void StartLoading(const std::vector<RestoredTab>& tabs);
66 66
67 // Loads the next tab. If there are no more tabs to load this deletes itself, 67 // Loads the next tab. If there are no more tabs to load this deletes itself,
68 // otherwise |force_load_timer_| is restarted. 68 // otherwise |force_load_timer_| is restarted.
69 void LoadNextTab(); 69 void LoadNextTab();
70 70
71 // Starts a timer to load load the next tab once expired before the current 71 // Starts |force_load_timer_| to load the first non-visible tab if the timer
72 // tab loading is finished. 72 // expires before a visible tab has finished loading. This uses the same
73 // timer but a different timeout value than StartTimer.
74 void StartFirstTimer();
75
76 // Starts |force_load_timer_| to load the next tab if the timer expires
77 // before the current tab loading is finished. This uses the same timer but a
78 // different timeout value than StartFirstTimer.
73 void StartTimer(); 79 void StartTimer();
74 80
75 // Removes the listeners from the specified tab and removes the tab from 81 // Removes the listeners from the specified tab and removes the tab from
76 // the set of tabs to load and list of tabs we're waiting to get a load 82 // the set of tabs to load and list of tabs we're waiting to get a load
77 // from. 83 // from.
78 void RemoveTab(content::NavigationController* controller); 84 void RemoveTab(content::NavigationController* controller);
79 85
80 // Invoked from |force_load_timer_|. Doubles |force_load_delay_multiplier_| 86 // Invoked from |force_load_timer_|. Doubles |force_load_delay_multiplier_|
81 // and invokes |LoadNextTab| to load the next tab 87 // and invokes |LoadNextTab| to load the next tab
82 void ForceLoadTimerFired(); 88 void ForceLoadTimerFired();
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 // For keeping TabLoader alive while it's loading even if no 131 // For keeping TabLoader alive while it's loading even if no
126 // SessionRestoreImpls reference it. 132 // SessionRestoreImpls reference it.
127 scoped_refptr<TabLoader> this_retainer_; 133 scoped_refptr<TabLoader> this_retainer_;
128 134
129 static TabLoader* shared_tab_loader_; 135 static TabLoader* shared_tab_loader_;
130 136
131 DISALLOW_COPY_AND_ASSIGN(TabLoader); 137 DISALLOW_COPY_AND_ASSIGN(TabLoader);
132 }; 138 };
133 139
134 #endif // CHROME_BROWSER_SESSIONS_TAB_LOADER_H_ 140 #endif // CHROME_BROWSER_SESSIONS_TAB_LOADER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sessions/tab_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698