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

Side by Side Diff: chrome/browser/sync/util/event_sys.h

Issue 194065: Initial commit of sync engine code to browser/sync.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Fixes to gtest include path, reverted syncapi. Created 11 years, 3 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
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2009 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_UTIL_EVENT_SYS_H_
6 #define CHROME_BROWSER_SYNC_UTIL_EVENT_SYS_H_
7
8 #include "chrome/browser/sync/util/pthread_helpers_fwd.h"
9
10 // An abstract base class for listening to events.
11 //
12 // Don't inherit from this class yourself. Using NewEventListenerHookup() is
13 // much easier.
14 template <typename EventType>
15 class EventListener {
16 public:
17 virtual void HandleEvent(const EventType& event) = 0;
18 };
19
20 // See the -inl.h for details about the following.
21
22 template <typename EventTraits, typename NotifyLock = PThreadNoLock,
23 typename ScopedNotifyLocker = PThreadScopedLock<NotifyLock> >
24 class EventChannel;
25
26 class EventListenerHookup;
27
28 template <typename EventChannel, typename CallbackObject,
29 typename CallbackMethod>
30 EventListenerHookup* NewEventListenerHookup(EventChannel* channel,
31 CallbackObject* cbobject,
32 CallbackMethod cbmethod);
33
34 template <typename EventChannel, typename CallbackObject,
35 typename CallbackMethod, typename CallbackArg0>
36 EventListenerHookup* NewEventListenerHookup(EventChannel* channel,
37 CallbackObject* cbobject,
38 CallbackMethod cbmethod,
39 CallbackArg0 arg0);
40
41 #endif // CHROME_BROWSER_SYNC_UTIL_EVENT_SYS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698