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#include "jingle/notifier/listener/fake_push_client_observer.h"
6
7namespace notifier {
8
9FakePushClientObserver::FakePushClientObserver()
10    :last_notifications_disabled_reason_(DEFAULT_NOTIFICATION_ERROR) {}
11
12FakePushClientObserver::~FakePushClientObserver() {}
13
14void FakePushClientObserver::OnNotificationsEnabled() {
15  last_notifications_disabled_reason_ = NO_NOTIFICATION_ERROR;
16}
17
18void FakePushClientObserver::OnNotificationsDisabled(
19    NotificationsDisabledReason reason) {
20  last_notifications_disabled_reason_ = reason;
21}
22
23void FakePushClientObserver::OnIncomingNotification(
24    const Notification& notification) {
25  last_incoming_notification_ = notification;
26}
27
28NotificationsDisabledReason
29FakePushClientObserver::last_notifications_disabled_reason() const {
30  return last_notifications_disabled_reason_;
31}
32
33const Notification&
34FakePushClientObserver::last_incoming_notification() const {
35  return last_incoming_notification_;
36}
37
38}  // namespace notifier
39
40