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

Side by Side Diff: components/sync/js/sync_js_controller.h

Issue 2240613002: [Sync] Convert sync to a static library. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Try getting rid of sync_core source set. Created 4 years, 4 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
« no previous file with comments | « components/sync/js/js_event_handler.h ('k') | components/sync/protocol/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 COMPONENTS_SYNC_JS_SYNC_JS_CONTROLLER_H_ 5 #ifndef COMPONENTS_SYNC_JS_SYNC_JS_CONTROLLER_H_
6 #define COMPONENTS_SYNC_JS_SYNC_JS_CONTROLLER_H_ 6 #define COMPONENTS_SYNC_JS_SYNC_JS_CONTROLLER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
14 #include "base/observer_list.h" 14 #include "base/observer_list.h"
15 #include "components/sync/base/sync_export.h"
16 #include "components/sync/base/weak_handle.h" 15 #include "components/sync/base/weak_handle.h"
17 #include "components/sync/js/js_controller.h" 16 #include "components/sync/js/js_controller.h"
18 #include "components/sync/js/js_event_handler.h" 17 #include "components/sync/js/js_event_handler.h"
19 18
20 namespace syncer { 19 namespace syncer {
21 20
22 class JsBackend; 21 class JsBackend;
23 22
24 // A class that mediates between the sync JsEventHandlers and the sync 23 // A class that mediates between the sync JsEventHandlers and the sync
25 // JsBackend. 24 // JsBackend.
26 class SYNC_EXPORT SyncJsController 25 class SyncJsController : public JsController,
27 : public JsController, 26 public JsEventHandler,
28 public JsEventHandler, 27 public base::SupportsWeakPtr<SyncJsController> {
29 public base::SupportsWeakPtr<SyncJsController> {
30 public: 28 public:
31 SyncJsController(); 29 SyncJsController();
32 30
33 ~SyncJsController() override; 31 ~SyncJsController() override;
34 32
35 // Sets the backend to route all messages to (if initialized). 33 // Sets the backend to route all messages to (if initialized).
36 // Sends any queued-up messages if |backend| is initialized. 34 // Sends any queued-up messages if |backend| is initialized.
37 void AttachJsBackend(const WeakHandle<JsBackend>& js_backend); 35 void AttachJsBackend(const WeakHandle<JsBackend>& js_backend);
38 36
39 // JsController implementation. 37 // JsController implementation.
(...skipping 11 matching lines...) Expand all
51 49
52 WeakHandle<JsBackend> js_backend_; 50 WeakHandle<JsBackend> js_backend_;
53 base::ObserverList<JsEventHandler> js_event_handlers_; 51 base::ObserverList<JsEventHandler> js_event_handlers_;
54 52
55 DISALLOW_COPY_AND_ASSIGN(SyncJsController); 53 DISALLOW_COPY_AND_ASSIGN(SyncJsController);
56 }; 54 };
57 55
58 } // namespace syncer 56 } // namespace syncer
59 57
60 #endif // COMPONENTS_SYNC_JS_SYNC_JS_CONTROLLER_H_ 58 #endif // COMPONENTS_SYNC_JS_SYNC_JS_CONTROLLER_H_
OLDNEW
« no previous file with comments | « components/sync/js/js_event_handler.h ('k') | components/sync/protocol/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698