OLD | NEW |
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 #include "components/sync/core_impl/js_sync_manager_observer.h" | 5 #include "components/sync/core_impl/js_sync_manager_observer.h" |
6 | 6 |
7 #include <cstddef> | 7 #include <cstddef> |
8 | 8 |
9 #include "base/location.h" | 9 #include "base/location.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/strings/string_number_conversions.h" | 11 #include "base/strings/string_number_conversions.h" |
12 #include "base/values.h" | 12 #include "base/values.h" |
13 #include "components/sync/base/model_type.h" | 13 #include "components/sync/base/model_type.h" |
14 #include "components/sync/core/change_record.h" | |
15 #include "components/sync/engine/cycle/sync_cycle_snapshot.h" | 14 #include "components/sync/engine/cycle/sync_cycle_snapshot.h" |
16 #include "components/sync/engine/sync_string_conversions.h" | 15 #include "components/sync/engine/sync_string_conversions.h" |
17 #include "components/sync/js/js_event_details.h" | 16 #include "components/sync/js/js_event_details.h" |
18 #include "components/sync/js/js_event_handler.h" | 17 #include "components/sync/js/js_event_handler.h" |
| 18 #include "components/sync/syncable/change_record.h" |
19 | 19 |
20 namespace syncer { | 20 namespace syncer { |
21 | 21 |
22 JsSyncManagerObserver::JsSyncManagerObserver() {} | 22 JsSyncManagerObserver::JsSyncManagerObserver() {} |
23 | 23 |
24 JsSyncManagerObserver::~JsSyncManagerObserver() {} | 24 JsSyncManagerObserver::~JsSyncManagerObserver() {} |
25 | 25 |
26 void JsSyncManagerObserver::SetJsEventHandler( | 26 void JsSyncManagerObserver::SetJsEventHandler( |
27 const WeakHandle<JsEventHandler>& event_handler) { | 27 const WeakHandle<JsEventHandler>& event_handler) { |
28 event_handler_ = event_handler; | 28 event_handler_ = event_handler; |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 const std::string& name, | 85 const std::string& name, |
86 const JsEventDetails& details) { | 86 const JsEventDetails& details) { |
87 if (!event_handler_.IsInitialized()) { | 87 if (!event_handler_.IsInitialized()) { |
88 NOTREACHED(); | 88 NOTREACHED(); |
89 return; | 89 return; |
90 } | 90 } |
91 event_handler_.Call(from_here, &JsEventHandler::HandleJsEvent, name, details); | 91 event_handler_.Call(from_here, &JsEventHandler::HandleJsEvent, name, details); |
92 } | 92 } |
93 | 93 |
94 } // namespace syncer | 94 } // namespace syncer |
OLD | NEW |