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

Side by Side Diff: chrome/browser/sessions/tab_loader_delegate.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 | « chrome/browser/sessions/tab_loader.cc ('k') | chrome/browser/sessions/tab_loader_delegate.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_SESSIONS_TAB_LOADER_DELEGATE_H_
6 #define CHROME_BROWSER_SESSIONS_TAB_LOADER_DELEGATE_H_ 6 #define CHROME_BROWSER_SESSIONS_TAB_LOADER_DELEGATE_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 10
11 class TabLoaderCallback { 11 class TabLoaderCallback {
12 public: 12 public:
13 // This function will get called to suppress and to allow tab loading. Tab 13 // This function will get called to suppress and to allow tab loading. Tab
14 // loading is initially enabled. 14 // loading is initially enabled.
15 virtual void SetTabLoadingEnabled(bool enable_tab_loading) = 0; 15 virtual void SetTabLoadingEnabled(bool enable_tab_loading) = 0;
16 }; 16 };
17 17
18 // TabLoaderDelegate is created once the SessionRestore process is complete and 18 // TabLoaderDelegate is created once the SessionRestore process is complete and
19 // the loading of hidden tabs starts. 19 // the loading of hidden tabs starts.
20 class TabLoaderDelegate { 20 class TabLoaderDelegate {
21 public: 21 public:
22 TabLoaderDelegate() {} 22 TabLoaderDelegate() {}
23 virtual ~TabLoaderDelegate() {} 23 virtual ~TabLoaderDelegate() {}
24 24
25 // Create a tab loader delegate. |TabLoaderCallback::SetTabLoadingEnabled| can 25 // Create a tab loader delegate. |TabLoaderCallback::SetTabLoadingEnabled| can
26 // get called to disable / enable tab loading. 26 // get called to disable / enable tab loading.
27 // The callback object is valid as long as this object exists. 27 // The callback object is valid as long as this object exists.
28 static scoped_ptr<TabLoaderDelegate> Create(TabLoaderCallback* callback); 28 static scoped_ptr<TabLoaderDelegate> Create(TabLoaderCallback* callback);
29 29
30 // Returns the default timeout time after which the first non-visible tab
31 // gets loaded if the first (visible) tab did not finish loading.
32 virtual base::TimeDelta GetFirstTabLoadingTimeout() const = 0;
33
30 // Returns the default timeout time after which the next tab gets loaded if 34 // Returns the default timeout time after which the next tab gets loaded if
31 // the previous tab did not finish to load. 35 // the previous tab did not finish loading.
32 virtual base::TimeDelta GetTimeoutBeforeLoadingNextTab() const = 0; 36 virtual base::TimeDelta GetTimeoutBeforeLoadingNextTab() const = 0;
33 }; 37 };
34 38
35 #endif // CHROME_BROWSER_SESSIONS_TAB_LOADER_DELEGATE_H_ 39 #endif // CHROME_BROWSER_SESSIONS_TAB_LOADER_DELEGATE_H_
OLDNEW
« no previous file with comments | « chrome/browser/sessions/tab_loader.cc ('k') | chrome/browser/sessions/tab_loader_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698