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