root/jingle/notifier/listener/fake_push_client_observer.cc

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. OnNotificationsEnabled
  2. OnNotificationsDisabled
  3. OnIncomingNotification
  4. last_notifications_disabled_reason
  5. last_incoming_notification

// 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.

#include "jingle/notifier/listener/fake_push_client_observer.h"

namespace notifier {

FakePushClientObserver::FakePushClientObserver()
    :last_notifications_disabled_reason_(DEFAULT_NOTIFICATION_ERROR) {}

FakePushClientObserver::~FakePushClientObserver() {}

void FakePushClientObserver::OnNotificationsEnabled() {
  last_notifications_disabled_reason_ = NO_NOTIFICATION_ERROR;
}

void FakePushClientObserver::OnNotificationsDisabled(
    NotificationsDisabledReason reason) {
  last_notifications_disabled_reason_ = reason;
}

void FakePushClientObserver::OnIncomingNotification(
    const Notification& notification) {
  last_incoming_notification_ = notification;
}

NotificationsDisabledReason
FakePushClientObserver::last_notifications_disabled_reason() const {
  return last_notifications_disabled_reason_;
}

const Notification&
FakePushClientObserver::last_incoming_notification() const {
  return last_incoming_notification_;
}

}  // namespace notifier


/* [<][>][^][v][top][bottom][index][help] */