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

Side by Side Diff: chrome/browser/ui/android/tab_model/tab_model.h

Issue 15499005: Add a new SyncedTabDelegate for Android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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_UI_ANDROID_TAB_MODEL_TAB_MODEL_H_ 5 #ifndef CHROME_BROWSER_UI_ANDROID_TAB_MODEL_TAB_MODEL_H_
6 #define CHROME_BROWSER_UI_ANDROID_TAB_MODEL_TAB_MODEL_H_ 6 #define CHROME_BROWSER_UI_ANDROID_TAB_MODEL_TAB_MODEL_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "chrome/browser/sessions/session_id.h" 9 #include "chrome/browser/sessions/session_id.h"
10 #include "chrome/browser/sync/glue/synced_tab_delegate.h"
10 #include "chrome/browser/ui/toolbar/toolbar_model.h" 11 #include "chrome/browser/ui/toolbar/toolbar_model.h"
11 #include "chrome/browser/ui/toolbar/toolbar_model_delegate.h" 12 #include "chrome/browser/ui/toolbar/toolbar_model_delegate.h"
12 #include "content/public/browser/notification_observer.h" 13 #include "content/public/browser/notification_observer.h"
13 #include "content/public/browser/notification_registrar.h" 14 #include "content/public/browser/notification_registrar.h"
14 15
15 namespace browser_sync { 16 namespace browser_sync {
16 class SyncedWindowDelegate; 17 class SyncedWindowDelegate;
17 class SyncedWindowDelegateAndroid; 18 class SyncedWindowDelegateAndroid;
19 class SyncedTabDelegate;
18 } 20 }
19 21
20 namespace content { 22 namespace content {
21 class WebContents; 23 class WebContents;
22 } 24 }
23 25
24 class Profile; 26 class Profile;
25 27
26 // Abstract representation of a Tab Model for Android. Since Android does 28 // Abstract representation of a Tab Model for Android. Since Android does
27 // not use Browser/BrowserList, this is required to allow Chrome to interact 29 // not use Browser/BrowserList, this is required to allow Chrome to interact
(...skipping 11 matching lines...) Expand all
39 virtual content::WebContents* GetActiveWebContents() const OVERRIDE; 41 virtual content::WebContents* GetActiveWebContents() const OVERRIDE;
40 42
41 virtual Profile* GetProfile() const; 43 virtual Profile* GetProfile() const;
42 virtual bool IsOffTheRecord() const; 44 virtual bool IsOffTheRecord() const;
43 virtual browser_sync::SyncedWindowDelegate* GetSyncedWindowDelegate() const; 45 virtual browser_sync::SyncedWindowDelegate* GetSyncedWindowDelegate() const;
44 virtual SessionID::id_type GetSessionId() const; 46 virtual SessionID::id_type GetSessionId() const;
45 47
46 virtual int GetTabCount() const = 0; 48 virtual int GetTabCount() const = 0;
47 virtual int GetActiveIndex() const = 0; 49 virtual int GetActiveIndex() const = 0;
48 virtual content::WebContents* GetWebContentsAt(int index) const = 0; 50 virtual content::WebContents* GetWebContentsAt(int index) const = 0;
49 virtual SessionID::id_type GetTabIdAt(int index) const = 0; 51 virtual browser_sync::SyncedTabDelegate* GetTabAt(int index) const = 0;
50 52
51 // Used for restoring tabs from synced foreign sessions. 53 // Used for restoring tabs from synced foreign sessions.
52 virtual void CreateTab(content::WebContents* web_contents) = 0; 54 virtual void CreateTab(content::WebContents* web_contents) = 0;
53 55
54 // Return true if we are currently restoring sessions asynchronously. 56 // Return true if we are currently restoring sessions asynchronously.
55 virtual bool IsSessionRestoreInProgress() const = 0; 57 virtual bool IsSessionRestoreInProgress() const = 0;
56 58
57 virtual void OpenClearBrowsingData() const = 0; 59 virtual void OpenClearBrowsingData() const = 0;
58 60
59 ToolbarModel::SecurityLevel GetSecurityLevelForCurrentTab(); 61 ToolbarModel::SecurityLevel GetSecurityLevelForCurrentTab();
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 // across sessions. 99 // across sessions.
98 SessionID session_id_; 100 SessionID session_id_;
99 101
100 // The Registrar used to register TabModel for notifications. 102 // The Registrar used to register TabModel for notifications.
101 content::NotificationRegistrar registrar_; 103 content::NotificationRegistrar registrar_;
102 104
103 DISALLOW_COPY_AND_ASSIGN(TabModel); 105 DISALLOW_COPY_AND_ASSIGN(TabModel);
104 }; 106 };
105 107
106 #endif // CHROME_BROWSER_UI_ANDROID_TAB_MODEL_TAB_MODEL_H_ 108 #endif // CHROME_BROWSER_UI_ANDROID_TAB_MODEL_TAB_MODEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698