chromium/storage/browser/file_system/task_runner_bound_observer_list.h

// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef STORAGE_BROWSER_FILE_SYSTEM_TASK_RUNNER_BOUND_OBSERVER_LIST_H_
#define STORAGE_BROWSER_FILE_SYSTEM_TASK_RUNNER_BOUND_OBSERVER_LIST_H_

#include <map>
#include <utility>

#include "base/functional/bind.h"
#include "base/location.h"
#include "base/memory/scoped_refptr.h"
#include "base/task/sequenced_task_runner.h"

namespace storage {

// An observer list helper to notify on a given task runner.
// Observer pointers must be kept alive until this list dispatches all the
// notifications.
//
// Unlike regular ObserverList or ObserverListThreadSafe internal observer
// list is immutable (though not declared const) and cannot be modified after
// constructed.
template <typename Observer>
class TaskRunnerBoundObserverList {};

class FileAccessObserver;
class FileChangeObserver;
class FileUpdateObserver;

AccessObserverList;
ChangeObserverList;
UpdateObserverList;

}  // namespace storage

#endif  // STORAGE_BROWSER_FILE_SYSTEM_TASK_RUNNER_BOUND_OBSERVER_LIST_H_