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

Unified Diff: chrome/browser/sync/glue/synced_tab_delegate.h

Issue 1310373009: [Sync] Remove static methods on SyncedWindowDelegate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/sync/glue/synced_tab_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/glue/synced_tab_delegate.h
diff --git a/chrome/browser/sync/glue/synced_tab_delegate.h b/chrome/browser/sync/glue/synced_tab_delegate.h
index 0645e4eb949b532d44321ff70b5bbee64fd29ab8..6bed8a9a23850da6965283b9f68e69101504b661 100644
--- a/chrome/browser/sync/glue/synced_tab_delegate.h
+++ b/chrome/browser/sync/glue/synced_tab_delegate.h
@@ -8,6 +8,8 @@
#include <string>
#include <vector>
+#include "base/memory/scoped_ptr.h"
+#include "chrome/browser/sync/sessions/synced_window_delegates_getter.h"
#include "components/sessions/session_id.h"
class Profile;
@@ -24,7 +26,7 @@ class SyncedWindowDelegate;
// directly on WebContents, NavigationController, and the extensions TabHelper.
class SyncedTabDelegate {
public:
- virtual ~SyncedTabDelegate() {}
+ virtual ~SyncedTabDelegate();
// Methods from TabContents.
@@ -69,13 +71,24 @@ class SyncedTabDelegate {
// Returns true if this tab should be synchronized.
bool ShouldSync() const;
+ // Sets the window getter. This must be called before any of the sync or
+ // supervised user methods on this class are called. It is currently set when
+ // the SyncTabDelegate is retrieved from WebContents via ImplFromWebContents.
+ void SetSyncedWindowGetter(scoped_ptr<SyncedWindowDelegatesGetter> getter);
+
// Returns the SyncedTabDelegate associated with WebContents.
static SyncedTabDelegate* ImplFromWebContents(
content::WebContents* web_contents);
protected:
+ SyncedTabDelegate();
+
// Overridden by the tests to avoid interaction with static state.
virtual const SyncedWindowDelegate* GetSyncedWindowDelegate() const;
+
+ private:
+ // A getter for accessing the associated SyncedWindowDelegate.
+ scoped_ptr<SyncedWindowDelegatesGetter> synced_window_getter_;
};
} // namespace browser_sync
« no previous file with comments | « no previous file | chrome/browser/sync/glue/synced_tab_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698