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

Side by Side Diff: chrome/browser/sync/sessions/sync_sessions_multi_windowed_web_contents_router.h

Issue 2753753005: [sync] WebContentsObserver based sessions notifications (Closed)
Patch Set: Separate non-android class Created 3 years, 9 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
OLDNEW
(Empty)
1 // Copyright 2017 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_SYNC_SESSIONS_SYNC_SESSIONS_MULTI_WINDOWED_WEB_CONTENTS_R OUTER_H_
6 #define CHROME_BROWSER_SYNC_SESSIONS_SYNC_SESSIONS_MULTI_WINDOWED_WEB_CONTENTS_R OUTER_H_
7
8 #include "chrome/browser/sync/sessions/sync_sessions_web_contents_router.h"
9 #include "chrome/browser/ui/browser_list_observer.h"
10 #include "chrome/browser/ui/tabs/tab_strip_model_observer.h"
11
12 class Profile;
13
14 namespace sync_sessions {
15
16 // Non-android subclass of SyncSessionsWebContentsRouter that adds tracking for
17 // multi-window scenarios(e.g. tab movement between windows). Android doesn't
18 // have a BrowserList or TabStrip, so it doesn't compile the needed
19 // dependencies, nor would it benefit from the added tracking.
20 class SyncSessionsMultiWindowedWebContentsRouter
Nicolas Zea 2017/03/20 18:14:50 Multi-windowed is a bit unclear of a name (Android
Patrick Noland 2017/03/21 22:54:30 Done.
21 : public SyncSessionsWebContentsRouter,
22 public chrome::BrowserListObserver,
23 public TabStripModelObserver {
24 public:
25 explicit SyncSessionsMultiWindowedWebContentsRouter(Profile* profile);
26
27 // KeyedService implementation.
28 void Shutdown() override;
29
30 protected:
31 ~SyncSessionsMultiWindowedWebContentsRouter() override;
32
33 private:
34 // chrome::BrowserListObserver implementation.
35 void OnBrowserAdded(Browser* browser) override;
36 void OnBrowserRemoved(Browser* browser) override;
37 // TabStripModelObserver implementation.
38 void TabInsertedAt(TabStripModel* model,
39 content::WebContents* web_contents,
40 int index,
41 bool foreground) override;
42 };
43
44 } // namespace sync_sessions
45
46 #endif // CHROME_BROWSER_SYNC_SESSIONS_SYNC_SESSIONS_MULTI_WINDOWED_WEB_CONTENT S_ROUTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698