Rename vector icon header files.
[chromium-blink-merge.git] / chrome / browser / sessions / tab_loader_delegate.h
blobe396ac5ab97cb09daf7fb250257bfcc2c88584bb
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_SESSIONS_TAB_LOADER_DELEGATE_H_
6 #define CHROME_BROWSER_SESSIONS_TAB_LOADER_DELEGATE_H_
8 #include "base/memory/scoped_ptr.h"
9 #include "base/time/time.h"
11 class TabLoaderCallback {
12 public:
13 // This function will get called to suppress and to allow tab loading. Tab
14 // loading is initially enabled.
15 virtual void SetTabLoadingEnabled(bool enable_tab_loading) = 0;
18 // TabLoaderDelegate is created once the SessionRestore process is complete and
19 // the loading of hidden tabs starts.
20 class TabLoaderDelegate {
21 public:
22 TabLoaderDelegate() {}
23 virtual ~TabLoaderDelegate() {}
25 // Create a tab loader delegate. |TabLoaderCallback::SetTabLoadingEnabled| can
26 // get called to disable / enable tab loading.
27 // The callback object is valid as long as this object exists.
28 static scoped_ptr<TabLoaderDelegate> Create(TabLoaderCallback* callback);
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;
34 // Returns the default timeout time after which the next tab gets loaded if
35 // the previous tab did not finish loading.
36 virtual base::TimeDelta GetTimeoutBeforeLoadingNextTab() const = 0;
39 #endif // CHROME_BROWSER_SESSIONS_TAB_LOADER_DELEGATE_H_