| OLD | NEW |
| 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 SYNC_INTERNAL_API_JS_MUTATION_EVENT_OBSERVER_H_ | 5 #ifndef SYNC_INTERNAL_API_JS_MUTATION_EVENT_OBSERVER_H_ |
| 6 #define SYNC_INTERNAL_API_JS_MUTATION_EVENT_OBSERVER_H_ | 6 #define SYNC_INTERNAL_API_JS_MUTATION_EVENT_OBSERVER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 int64 write_transaction_id, | 48 int64 write_transaction_id, |
| 49 const ImmutableChangeRecordList& changes) OVERRIDE; | 49 const ImmutableChangeRecordList& changes) OVERRIDE; |
| 50 virtual void OnChangesComplete(ModelType model_type) OVERRIDE; | 50 virtual void OnChangesComplete(ModelType model_type) OVERRIDE; |
| 51 | 51 |
| 52 // syncable::TransactionObserver implementation. | 52 // syncable::TransactionObserver implementation. |
| 53 virtual void OnTransactionWrite( | 53 virtual void OnTransactionWrite( |
| 54 const syncable::ImmutableWriteTransactionInfo& write_transaction_info, | 54 const syncable::ImmutableWriteTransactionInfo& write_transaction_info, |
| 55 ModelTypeSet models_with_changes) OVERRIDE; | 55 ModelTypeSet models_with_changes) OVERRIDE; |
| 56 | 56 |
| 57 private: | 57 private: |
| 58 base::WeakPtrFactory<JsMutationEventObserver> weak_ptr_factory_; | |
| 59 WeakHandle<JsEventHandler> event_handler_; | 58 WeakHandle<JsEventHandler> event_handler_; |
| 60 | 59 |
| 61 void HandleJsEvent( | 60 void HandleJsEvent( |
| 62 const tracked_objects::Location& from_here, | 61 const tracked_objects::Location& from_here, |
| 63 const std::string& name, const JsEventDetails& details); | 62 const std::string& name, const JsEventDetails& details); |
| 64 | 63 |
| 64 base::WeakPtrFactory<JsMutationEventObserver> weak_ptr_factory_; |
| 65 |
| 65 DISALLOW_COPY_AND_ASSIGN(JsMutationEventObserver); | 66 DISALLOW_COPY_AND_ASSIGN(JsMutationEventObserver); |
| 66 }; | 67 }; |
| 67 | 68 |
| 68 } // namespace syncer | 69 } // namespace syncer |
| 69 | 70 |
| 70 #endif // SYNC_INTERNAL_API_JS_MUTATION_EVENT_OBSERVER_H_ | 71 #endif // SYNC_INTERNAL_API_JS_MUTATION_EVENT_OBSERVER_H_ |
| OLD | NEW |