OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_UI_ANDROID_TAB_MODEL_TAB_MODEL_H_ | |
6 #define CHROME_BROWSER_UI_ANDROID_TAB_MODEL_TAB_MODEL_H_ | |
7 | |
8 #include "chrome/browser/sessions/session_id.h" | |
9 | |
10 namespace browser_sync { | |
11 class SyncedWindowDelegate; | |
12 } | |
13 | |
14 namespace content { | |
15 class WebContents; | |
16 } | |
17 | |
18 class Profile; | |
19 class TabContents; | |
20 | |
21 // Abstract representation of a Tab Model for Android. Since Android does | |
22 // not use Browser/BrowserList, this is required to allow Chrome to interact | |
23 // with Android's Tabs and Tab Model. | |
24 class TabModel { | |
25 public: | |
26 TabModel(); | |
27 virtual ~TabModel(); | |
28 | |
29 virtual SessionID::id_type GetSessionId() const = 0; | |
30 virtual int GetTabCount() const = 0; | |
31 virtual int GetActiveIndex() const = 0; | |
32 virtual TabContents* GetTabContentsAt(int index) const = 0; | |
33 virtual SessionID::id_type GetTabIdAt(int index) const = 0; | |
34 | |
35 // Used for restoring tabs from synced foreign sessions. | |
36 virtual void CreateTab(content::WebContents* web_contents) = 0; | |
37 | |
38 // Returns true when all tabs have been restored from disk. | |
nyquist
2012/07/24 18:32:34
This comment seems wrong. I believe it should be s
David Trainor- moved to gerrit
2012/07/24 20:48:52
Done.
| |
39 virtual bool IsSessionRestoreInProgress() const = 0; | |
40 | |
41 virtual void OpenClearBrowsingData() const = 0; | |
42 virtual Profile* GetProfile() const = 0; | |
43 | |
44 virtual browser_sync::SyncedWindowDelegate* GetSyncedWindowDelegate() = 0; | |
45 | |
46 protected: | |
47 // Instructs the TabModel to broadcast a notification that all tabs are now | |
48 // loaded from storage. | |
49 void BroadcastSessionRestoreComplete(); | |
50 | |
51 private: | |
52 DISALLOW_COPY_AND_ASSIGN(TabModel); | |
53 }; | |
54 | |
55 #endif // CHROME_BROWSER_UI_ANDROID_TAB_MODEL_TAB_MODEL_H_ | |
OLD | NEW |