OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_SYNC_GLUE_SYNCED_TAB_DELEGATE_ANDROID_H_ | 5 #ifndef CHROME_BROWSER_SYNC_GLUE_SYNCED_TAB_DELEGATE_ANDROID_H_ |
6 #define CHROME_BROWSER_SYNC_GLUE_SYNCED_TAB_DELEGATE_ANDROID_H_ | 6 #define CHROME_BROWSER_SYNC_GLUE_SYNCED_TAB_DELEGATE_ANDROID_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "chrome/browser/sync/glue/synced_tab_delegate.h" | 9 #include "components/sync_sessions/synced_tab_delegate.h" |
10 #include "content/public/browser/web_contents_user_data.h" | 10 #include "content/public/browser/web_contents_user_data.h" |
11 | 11 |
12 namespace content { | 12 namespace content { |
13 class WebContents; | 13 class WebContents; |
14 } | 14 } |
15 | 15 |
16 class TabAndroid; | 16 class TabAndroid; |
17 class TabContentsSyncedTabDelegate; | 17 class TabContentsSyncedTabDelegate; |
18 | 18 |
19 namespace browser_sync { | 19 namespace browser_sync { |
20 // On Android a tab can exist even without web contents. | 20 // On Android a tab can exist even without web contents. |
21 | 21 |
22 // SyncedTabDelegateAndroid wraps TabContentsSyncedTabDelegate and provides | 22 // SyncedTabDelegateAndroid wraps TabContentsSyncedTabDelegate and provides |
23 // a method to set web contents later when tab is brought to memory. | 23 // a method to set web contents later when tab is brought to memory. |
24 class SyncedTabDelegateAndroid : public browser_sync::SyncedTabDelegate { | 24 class SyncedTabDelegateAndroid : public browser_sync::SyncedTabDelegate { |
25 public: | 25 public: |
26 explicit SyncedTabDelegateAndroid(TabAndroid* owning_tab_); | 26 explicit SyncedTabDelegateAndroid(TabAndroid* owning_tab_); |
27 ~SyncedTabDelegateAndroid() override; | 27 ~SyncedTabDelegateAndroid() override; |
28 | 28 |
29 // Methods from SyncedTabDelegate. | 29 // SyncedTabDelegate: |
30 SessionID::id_type GetWindowId() const override; | 30 SessionID::id_type GetWindowId() const override; |
skym
2015/10/16 16:55:46
While you're in here, should probably #include for
Nicolas Zea
2015/10/20 23:14:41
So, my interpretation of IWYU is that it's not nec
| |
31 SessionID::id_type GetSessionId() const override; | 31 SessionID::id_type GetSessionId() const override; |
32 bool IsBeingDestroyed() const override; | 32 bool IsBeingDestroyed() const override; |
33 Profile* profile() const override; | |
34 std::string GetExtensionAppId() const override; | 33 std::string GetExtensionAppId() const override; |
skym
2015/10/16 16:55:47
While you're in here, #include <string>. Although,
Nicolas Zea
2015/10/20 23:14:41
Done.
| |
35 bool IsInitialBlankNavigation() const override; | 34 bool IsInitialBlankNavigation() const override; |
36 int GetCurrentEntryIndex() const override; | 35 int GetCurrentEntryIndex() const override; |
37 int GetEntryCount() const override; | 36 int GetEntryCount() const override; |
38 int GetPendingEntryIndex() const override; | 37 GURL GetVirtualURLAtIndex(int i) const override; |
skym
2015/10/16 16:55:46
Forward declare GURL
Nicolas Zea
2015/10/20 23:14:41
See above
| |
39 content::NavigationEntry* GetPendingEntry() const override; | 38 GURL GetFaviconURLAtIndex(int i) const override; |
40 content::NavigationEntry* GetEntryAtIndex(int i) const override; | 39 ui::PageTransition GetTransitionAtIndex(int i) const override; |
skym
2015/10/16 16:55:46
#include for ui::PageTransition
Nicolas Zea
2015/10/20 23:14:41
see above
| |
41 content::NavigationEntry* GetActiveEntry() const override; | 40 void GetSerializedNavigationAtIndex( |
41 int i, | |
42 sessions::SerializedNavigationEntry* serialized_entry) const override; | |
skym
2015/10/16 16:55:46
Forward declare SerializedNavigationEntry
Nicolas Zea
2015/10/20 23:14:42
See above.
| |
42 bool IsPinned() const override; | 43 bool IsPinned() const override; |
43 bool HasWebContents() const override; | 44 bool HasWebContents() const override; |
44 content::WebContents* GetWebContents() const override; | |
45 int GetSyncId() const override; | 45 int GetSyncId() const override; |
46 void SetSyncId(int sync_id) override; | 46 void SetSyncId(int sync_id) override; |
47 | |
48 // Supervised user related methods. | |
49 | |
50 bool ProfileIsSupervised() const override; | 47 bool ProfileIsSupervised() const override; |
51 const std::vector<const content::NavigationEntry*>* GetBlockedNavigations() | 48 const std::vector<const sessions::SerializedNavigationEntry*>* |
52 const override; | 49 GetBlockedNavigations() const override; |
skym
2015/10/16 16:55:46
Indentation looks odd here, might be the cr tool.
Nicolas Zea
2015/10/20 23:14:41
Yeah, this is git cl format's work.
| |
53 | 50 |
54 // Set the web contents for this tab. Also creates | 51 // Set the web contents for this tab. Also creates |
55 // TabContentsSyncedTabDelegate for this tab. | 52 // TabContentsSyncedTabDelegate for this tab. |
56 virtual void SetWebContents(content::WebContents* web_contents); | 53 virtual void SetWebContents(content::WebContents* web_contents); |
57 // Set web contents to null. | 54 // Set web contents to null. |
58 virtual void ResetWebContents(); | 55 virtual void ResetWebContents(); |
59 | 56 |
60 private: | 57 private: |
61 content::WebContents* web_contents_; | 58 content::WebContents* web_contents_; |
62 TabAndroid* tab_android_; | 59 TabAndroid* tab_android_; |
63 TabContentsSyncedTabDelegate* tab_contents_delegate_; | 60 TabContentsSyncedTabDelegate* tab_contents_delegate_; |
64 | 61 |
65 DISALLOW_COPY_AND_ASSIGN(SyncedTabDelegateAndroid); | 62 DISALLOW_COPY_AND_ASSIGN(SyncedTabDelegateAndroid); |
66 }; | 63 }; |
67 } // namespace browser_sync | 64 } // namespace browser_sync |
68 | 65 |
69 #endif // CHROME_BROWSER_SYNC_GLUE_SYNCED_TAB_DELEGATE_ANDROID_H_ | 66 #endif // CHROME_BROWSER_SYNC_GLUE_SYNCED_TAB_DELEGATE_ANDROID_H_ |
OLD | NEW |