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

Side by Side Diff: components/sync/core_impl/js_mutation_event_observer.h

Issue 2130453004: [Sync] Move //sync to //components/sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. 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
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 SYNC_INTERNAL_API_JS_MUTATION_EVENT_OBSERVER_H_ 5 #ifndef COMPONENTS_SYNC_CORE_IMPL_JS_MUTATION_EVENT_OBSERVER_H_
6 #define SYNC_INTERNAL_API_JS_MUTATION_EVENT_OBSERVER_H_ 6 #define COMPONENTS_SYNC_CORE_IMPL_JS_MUTATION_EVENT_OBSERVER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
11 11
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/memory/weak_ptr.h" 14 #include "base/memory/weak_ptr.h"
15 #include "base/threading/non_thread_safe.h" 15 #include "base/threading/non_thread_safe.h"
16 #include "sync/base/sync_export.h" 16 #include "components/sync/base/sync_export.h"
17 #include "sync/internal_api/public/sync_manager.h" 17 #include "components/sync/base/weak_handle.h"
18 #include "sync/internal_api/public/util/weak_handle.h" 18 #include "components/sync/core/sync_manager.h"
19 #include "sync/syncable/transaction_observer.h" 19 #include "components/sync/syncable/transaction_observer.h"
20 20
21 namespace tracked_objects { 21 namespace tracked_objects {
22 class Location; 22 class Location;
23 } // namespace tracked_objects 23 } // namespace tracked_objects
24 24
25 namespace syncer { 25 namespace syncer {
26 26
27 class JsEventDetails; 27 class JsEventDetails;
28 class JsEventHandler; 28 class JsEventHandler;
29 29
(...skipping 21 matching lines...) Expand all
51 void OnChangesComplete(ModelType model_type) override; 51 void OnChangesComplete(ModelType model_type) override;
52 52
53 // syncable::TransactionObserver implementation. 53 // syncable::TransactionObserver implementation.
54 void OnTransactionWrite( 54 void OnTransactionWrite(
55 const syncable::ImmutableWriteTransactionInfo& write_transaction_info, 55 const syncable::ImmutableWriteTransactionInfo& write_transaction_info,
56 ModelTypeSet models_with_changes) override; 56 ModelTypeSet models_with_changes) override;
57 57
58 private: 58 private:
59 WeakHandle<JsEventHandler> event_handler_; 59 WeakHandle<JsEventHandler> event_handler_;
60 60
61 void HandleJsEvent( 61 void HandleJsEvent(const tracked_objects::Location& from_here,
62 const tracked_objects::Location& from_here, 62 const std::string& name,
63 const std::string& name, const JsEventDetails& details); 63 const JsEventDetails& details);
64 64
65 base::WeakPtrFactory<JsMutationEventObserver> weak_ptr_factory_; 65 base::WeakPtrFactory<JsMutationEventObserver> weak_ptr_factory_;
66 66
67 DISALLOW_COPY_AND_ASSIGN(JsMutationEventObserver); 67 DISALLOW_COPY_AND_ASSIGN(JsMutationEventObserver);
68 }; 68 };
69 69
70 } // namespace syncer 70 } // namespace syncer
71 71
72 #endif // SYNC_INTERNAL_API_JS_MUTATION_EVENT_OBSERVER_H_ 72 #endif // COMPONENTS_SYNC_CORE_IMPL_JS_MUTATION_EVENT_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698