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

Side by Side Diff: chrome/browser/sync/js_transaction_observer.h

Issue 7497051: sync: Move all the js_* files into a js/ subdirectory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/sync/js_test_util.cc ('k') | chrome/browser/sync/js_transaction_observer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2011 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_JS_TRANSACTION_OBSERVER_H_
6 #define CHROME_BROWSER_SYNC_JS_TRANSACTION_OBSERVER_H_
7 #pragma once
8
9 #include <string>
10
11 #include "base/basictypes.h"
12 #include "base/compiler_specific.h"
13 #include "base/threading/non_thread_safe.h"
14 #include "chrome/browser/sync/syncable/transaction_observer.h"
15 #include "chrome/browser/sync/weak_handle.h"
16
17 namespace tracked_objects {
18 class Location;
19 } // namespace tracked_objects
20
21 namespace browser_sync {
22
23 class JsEventDetails;
24 class JsEventHandler;
25
26 // Routes SyncManager events to a JsEventHandler.
27 class JsTransactionObserver : public syncable::TransactionObserver {
28 public:
29 JsTransactionObserver();
30
31 virtual ~JsTransactionObserver();
32
33 void SetJsEventHandler(const WeakHandle<JsEventHandler>& event_handler);
34
35 // syncable::TransactionObserver implementation.
36 virtual void OnTransactionStart(
37 const tracked_objects::Location& location,
38 const syncable::WriterTag& writer) OVERRIDE;
39 virtual void OnTransactionMutate(
40 const tracked_objects::Location& location,
41 const syncable::WriterTag& writer,
42 const syncable::EntryKernelMutationSet& mutations,
43 const syncable::ModelTypeBitSet& models_with_changes) OVERRIDE;
44 virtual void OnTransactionEnd(
45 const tracked_objects::Location& location,
46 const syncable::WriterTag& writer) OVERRIDE;
47
48 private:
49 base::NonThreadSafe non_thread_safe_;
50 WeakHandle<JsEventHandler> event_handler_;
51
52 void HandleJsEvent(
53 const tracked_objects::Location& from_here,
54 const std::string& name, const JsEventDetails& details);
55
56 DISALLOW_COPY_AND_ASSIGN(JsTransactionObserver);
57 };
58
59 } // namespace browser_sync
60
61 #endif // CHROME_BROWSER_SYNC_JS_TRANSACTION_OBSERVER_H_
OLDNEW
« no previous file with comments | « chrome/browser/sync/js_test_util.cc ('k') | chrome/browser/sync/js_transaction_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698