- add sources.
[platform/framework/web/crosswalk.git] / src / chrome / browser / sync / glue / session_data_type_controller.h
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_SYNC_GLUE_SESSION_DATA_TYPE_CONTROLLER_H_
6 #define CHROME_BROWSER_SYNC_GLUE_SESSION_DATA_TYPE_CONTROLLER_H_
7
8 #include <string>
9
10 #include "base/compiler_specific.h"
11 #include "chrome/browser/sync/glue/frontend_data_type_controller.h"
12 #include "content/public/browser/notification_observer.h"
13 #include "content/public/browser/notification_registrar.h"
14
15 namespace browser_sync {
16
17 class SessionModelAssociator;
18
19 class SessionDataTypeController : public FrontendDataTypeController,
20                                   public content::NotificationObserver {
21  public:
22   SessionDataTypeController(
23       ProfileSyncComponentsFactory* profile_sync_factory,
24       Profile* profile,
25       ProfileSyncService* sync_service);
26
27   SessionModelAssociator* GetModelAssociator();
28
29   // FrontendDataTypeController implementation.
30   virtual syncer::ModelType type() const OVERRIDE;
31
32   // NotificationObserver interface.
33   virtual void Observe(int type,
34                        const content::NotificationSource& source,
35                        const content::NotificationDetails& details) OVERRIDE;
36
37  private:
38   virtual ~SessionDataTypeController();
39
40   // FrontendDataTypeController implementations.
41   virtual bool StartModels() OVERRIDE;
42   virtual void CleanUpState() OVERRIDE;
43   // Datatype specific creation of sync components.
44   virtual void CreateSyncComponents() OVERRIDE;
45
46   content::NotificationRegistrar notification_registrar_;
47
48   DISALLOW_COPY_AND_ASSIGN(SessionDataTypeController);
49 };
50
51 }  // namespace browser_sync
52
53 #endif  // CHROME_BROWSER_SYNC_GLUE_SESSION_DATA_TYPE_CONTROLLER_H_
54