Index: jingle/notifier/listener/fake_push_client_observer.h |
diff --git a/jingle/notifier/listener/fake_push_client_observer.h b/jingle/notifier/listener/fake_push_client_observer.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..b8ee6d6efedf0f56167b87a41a30a193f3f41878 |
--- /dev/null |
+++ b/jingle/notifier/listener/fake_push_client_observer.h |
@@ -0,0 +1,35 @@ |
+// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef JINGLE_NOTIFIER_LISTENER_NON_BLOCKING_FAKE_PUSH_CLIENT_OBSERVER_H_ |
+#define JINGLE_NOTIFIER_LISTENER_NON_BLOCKING_FAKE_PUSH_CLIENT_OBSERVER_H_ |
+ |
+#include "base/compiler_specific.h" |
+#include "jingle/notifier/listener/push_client_observer.h" |
+ |
+namespace notifier { |
+ |
+// PushClientObserver implementation that can be used for testing. |
+class FakePushClientObserver : public PushClientObserver { |
+ public: |
+ FakePushClientObserver(); |
+ virtual ~FakePushClientObserver(); |
+ |
+ // PushClientObserver implementation. |
+ virtual void OnNotificationStateChange( |
+ bool notifications_enabled) OVERRIDE; |
+ virtual void OnIncomingNotification( |
+ const Notification& notification) OVERRIDE; |
+ |
+ bool notifications_enabled() const; |
+ const Notification& last_incoming_notification() const; |
+ |
+ private: |
+ bool notifications_enabled_; |
+ Notification last_incoming_notification_; |
+}; |
+ |
+} // namespace notifier |
+ |
+#endif // JINGLE_NOTIFIER_LISTENER_NON_BLOCKING_FAKE_PUSH_CLIENT_OBSERVER_H_ |