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_ANDROID_H_ | |
6 #define CHROME_BROWSER_UI_ANDROID_TAB_MODEL_TAB_MODEL_ANDROID_H_ | |
7 #pragma once | |
sky
2012/07/17 00:32:12
no more #pragma once (see style guide).
David Trainor- moved to gerrit
2012/07/18 23:59:04
Done.
| |
8 | |
9 #include "base/memory/scoped_ptr.h" | |
10 #include "chrome/browser/sessions/session_id.h" | |
11 | |
12 namespace browser_sync { | |
13 class SyncedWindowDelegateAndroid; | |
14 class SyncedWindowDelegate; | |
15 } | |
16 | |
17 namespace content { | |
18 class WebContents; | |
19 } | |
20 | |
21 class Profile; | |
22 class TabContents; | |
23 | |
24 class TabModelAndroid { | |
sky
2012/07/17 00:32:12
Add a description.
David Trainor- moved to gerrit
2012/07/18 23:59:04
Done.
| |
25 public: | |
26 TabModelAndroid(); | |
27 virtual SessionID::id_type GetSessionId() const = 0; | |
sky
2012/07/17 00:32:12
nit: newline between 26/27.
David Trainor- moved to gerrit
2012/07/18 23:59:04
Done.
| |
28 virtual int GetTabCount() const = 0; | |
29 virtual int GetActiveIndex() const = 0; | |
30 virtual TabContents* GetTabContentsAt(int index) const = 0; | |
31 virtual SessionID::id_type GetTabIdAt(int index) const = 0; | |
32 | |
33 // Used for restoring tabs from synced foreign sessions. | |
34 virtual void CreateTab(content::WebContents* web_contents) = 0; | |
35 | |
36 // Returns true when all tabs have been restored from disk. | |
37 virtual bool AreAllTabsLoaded() const = 0; | |
38 | |
39 virtual void OpenClearBrowsingData() const = 0; | |
40 virtual Profile* profile() const = 0; | |
sky
2012/07/17 00:32:12
virtual methods should not be unix_hacker_style.
David Trainor- moved to gerrit
2012/07/18 23:59:04
Done.
| |
41 | |
42 browser_sync::SyncedWindowDelegate* synced_window_delegate() const; | |
sky
2012/07/17 00:32:12
Its generally dangerous to have a const method ret
David Trainor- moved to gerrit
2012/07/18 23:59:04
Done.
| |
43 | |
44 protected: | |
45 void BroadcastAllTabsLoaded(); | |
46 | |
47 virtual ~TabModelAndroid(); | |
sky
2012/07/17 00:32:12
destructor before other methods.
David Trainor- moved to gerrit
2012/07/18 23:59:04
Done.
| |
48 | |
49 private: | |
50 scoped_ptr<browser_sync::SyncedWindowDelegateAndroid> synced_window_delegate_; | |
sky
2012/07/17 00:32:12
Try to keep your interface pure virtual. Can this
David Trainor- moved to gerrit
2012/07/18 23:59:04
I can pull out synced_window_delegate_ and Broadca
| |
51 }; | |
52 #endif // CHROME_BROWSER_UI_ANDROID_TAB_MODEL_TAB_MODEL_ANDROID_H_ | |
sky
2012/07/17 00:32:12
newline between 52/52.
David Trainor- moved to gerrit
2012/07/18 23:59:04
Done.
| |
OLD | NEW |