Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / invalidation / invalidation_logger_observer.h
1 // Copyright 2014 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_INVALIDATION_INVALIDATION_LOGGER_OBSERVER_H_
6 #define CHROME_BROWSER_INVALIDATION_INVALIDATION_LOGGER_OBSERVER_H_
7
8 #include "base/memory/scoped_ptr.h"
9 #include "sync/notifier/invalidator_state.h"
10 #include "sync/notifier/object_id_invalidation_map.h"
11
12 namespace base {
13 class DictionaryValue;
14 }  // namespace base
15
16 namespace syncer {
17 class ObjectIdInvalidationMap;
18 }  // namespace syncer
19
20 namespace invalidation {
21 // This class provides the possibilty to register as an observer for the
22 // InvalidationLogger notifications whenever an InvalidatorService changes
23 // its internal state.
24 // (i.e. A new registration, a new invalidation, a TICL/GCM state change)
25
26 class InvalidationLoggerObserver {
27  public:
28   virtual void OnRegistration(const base::DictionaryValue& details) = 0;
29   virtual void OnUnregistration(const base::DictionaryValue& details) = 0;
30   virtual void OnStateChange(const syncer::InvalidatorState& newState) = 0;
31   virtual void OnUpdateIds(const base::DictionaryValue& details) = 0;
32   virtual void OnDebugMessage(const base::DictionaryValue& details) = 0;
33   virtual void OnInvalidation(
34       const syncer::ObjectIdInvalidationMap& details) = 0;
35
36  protected:
37   virtual ~InvalidationLoggerObserver() {}
38 };
39
40 }  // namespace invalidation
41
42 #endif  // CHROME_BROWSER_INVALIDATION_INVALIDATION_LOGGER_OBSERVER_H_