OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 JINGLE_NOTIFIER_LISTENER_NON_BLOCKING_FAKE_PUSH_CLIENT_OBSERVER_H_ | 5 #ifndef JINGLE_NOTIFIER_LISTENER_NON_BLOCKING_FAKE_PUSH_CLIENT_OBSERVER_H_ |
6 #define JINGLE_NOTIFIER_LISTENER_NON_BLOCKING_FAKE_PUSH_CLIENT_OBSERVER_H_ | 6 #define JINGLE_NOTIFIER_LISTENER_NON_BLOCKING_FAKE_PUSH_CLIENT_OBSERVER_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "jingle/notifier/listener/push_client_observer.h" | 9 #include "jingle/notifier/listener/push_client_observer.h" |
10 | 10 |
11 namespace notifier { | 11 namespace notifier { |
12 | 12 |
13 // PushClientObserver implementation that can be used for testing. | 13 // PushClientObserver implementation that can be used for testing. |
14 class FakePushClientObserver : public PushClientObserver { | 14 class FakePushClientObserver : public PushClientObserver { |
15 public: | 15 public: |
16 FakePushClientObserver(); | 16 FakePushClientObserver(); |
17 virtual ~FakePushClientObserver(); | 17 virtual ~FakePushClientObserver(); |
18 | 18 |
19 // PushClientObserver implementation. | 19 // PushClientObserver implementation. |
20 virtual void OnNotificationsEnabled() OVERRIDE; | 20 virtual void OnNotificationsEnabled() override; |
21 virtual void OnNotificationsDisabled( | 21 virtual void OnNotificationsDisabled( |
22 NotificationsDisabledReason reason) OVERRIDE; | 22 NotificationsDisabledReason reason) override; |
23 virtual void OnIncomingNotification( | 23 virtual void OnIncomingNotification( |
24 const Notification& notification) OVERRIDE; | 24 const Notification& notification) override; |
25 | 25 |
26 NotificationsDisabledReason last_notifications_disabled_reason() const; | 26 NotificationsDisabledReason last_notifications_disabled_reason() const; |
27 const Notification& last_incoming_notification() const; | 27 const Notification& last_incoming_notification() const; |
28 | 28 |
29 private: | 29 private: |
30 NotificationsDisabledReason last_notifications_disabled_reason_; | 30 NotificationsDisabledReason last_notifications_disabled_reason_; |
31 Notification last_incoming_notification_; | 31 Notification last_incoming_notification_; |
32 }; | 32 }; |
33 | 33 |
34 } // namespace notifier | 34 } // namespace notifier |
35 | 35 |
36 #endif // JINGLE_NOTIFIER_LISTENER_NON_BLOCKING_FAKE_PUSH_CLIENT_OBSERVER_H_ | 36 #endif // JINGLE_NOTIFIER_LISTENER_NON_BLOCKING_FAKE_PUSH_CLIENT_OBSERVER_H_ |
OLD | NEW |