Home | History | Annotate | Download | only in listener
      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
      3 // found in the LICENSE file.
      4 
      5 #ifndef JINGLE_NOTIFIER_LISTENER_NON_BLOCKING_FAKE_PUSH_CLIENT_OBSERVER_H_
      6 #define JINGLE_NOTIFIER_LISTENER_NON_BLOCKING_FAKE_PUSH_CLIENT_OBSERVER_H_
      7 
      8 #include "base/compiler_specific.h"
      9 #include "jingle/notifier/listener/push_client_observer.h"
     10 
     11 namespace notifier {
     12 
     13 // PushClientObserver implementation that can be used for testing.
     14 class FakePushClientObserver : public PushClientObserver {
     15  public:
     16   FakePushClientObserver();
     17   virtual ~FakePushClientObserver();
     18 
     19   // PushClientObserver implementation.
     20   virtual void OnNotificationsEnabled() OVERRIDE;
     21   virtual void OnNotificationsDisabled(
     22       NotificationsDisabledReason reason) OVERRIDE;
     23   virtual void OnIncomingNotification(
     24       const Notification& notification) OVERRIDE;
     25 
     26   NotificationsDisabledReason last_notifications_disabled_reason() const;
     27   const Notification& last_incoming_notification() const;
     28 
     29  private:
     30   NotificationsDisabledReason last_notifications_disabled_reason_;
     31   Notification last_incoming_notification_;
     32 };
     33 
     34 }  // namespace notifier
     35 
     36 #endif  // JINGLE_NOTIFIER_LISTENER_NON_BLOCKING_FAKE_PUSH_CLIENT_OBSERVER_H_
     37