// Copyright 2017 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef MOJO_PUBLIC_CPP_SYSTEM_HANDLE_SIGNAL_TRACKER_H_ #define MOJO_PUBLIC_CPP_SYSTEM_HANDLE_SIGNAL_TRACKER_H_ #include "base/functional/callback.h" #include "base/task/sequenced_task_runner.h" #include "mojo/public/c/system/types.h" #include "mojo/public/cpp/system/handle.h" #include "mojo/public/cpp/system/simple_watcher.h" #include "mojo/public/cpp/system/system_export.h" namespace base { class SequencedTaskRunner; } namespace mojo { // This class helps track the state of specific signal on a handle so that // the user doesn't have to manually query the signal state every time they // want to know the handle's state. // // Usage of this class is specifically targeting cases where the signal state // changes infrequently but must be queried frequently. If either condition does // not hold, consider using Handle::QuerySignalsState (or // MojoQueryHandleSignalsState) directly instead. class MOJO_CPP_SYSTEM_EXPORT HandleSignalTracker { … }; } // namespace mojo #endif // MOJO_PUBLIC_CPP_SYSTEM_HANDLE_SIGNAL_TRACKER_H_