blob: 6b48e56fb54479d3507f57a875fdd747b84255ca [file] [log] [blame]
// Copyright 2017 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 "base/macros.h"
#include "components/previews/core/previews_logger.h"
namespace previews {
// An interface for PreviewsLogger observer. This interface is for responding to
// events occur in PreviewsLogger (e.g. PreviewsLogger::LogMessage events).
class PreviewsLoggerObserver {
// Notifies this observer that |message| has been added in PreviewsLogger.
virtual void OnNewMessageLogAdded(
const PreviewsLogger::MessageLog& message) = 0;
// Notifies this observer that |host| is blacklisted at |time|.
virtual void OnNewBlacklistedHost(const std::string& host,
base::Time time) = 0;
// Notifies this observer that the user blacklisted state has changed to
// |blacklisted|.
virtual void OnUserBlacklistedStatusChange(bool blacklisted) = 0;
// Notifies this observer that the blacklist is cleared at |time|.
virtual void OnBlacklistCleared(base::Time time) = 0;
// Notify this observer that PreviewsBlackList decisions is ignored or not.
virtual void OnIgnoreBlacklistDecisionStatusChanged(bool ignored) = 0;
// Notify this observer that |this| is the last observer to be removed from
// the Logger's observers list.
virtual void OnLastObserverRemove() = 0;
PreviewsLoggerObserver() {}
virtual ~PreviewsLoggerObserver() {}
} // namespace previews