Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(578)

Unified Diff: mojo/message_pump/handle_watcher.h

Issue 1280463003: Revert of Straightens outs DEPS in mojo/common (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/message_pump/BUILD.gn ('k') | mojo/message_pump/handle_watcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/message_pump/handle_watcher.h
diff --git a/mojo/message_pump/handle_watcher.h b/mojo/message_pump/handle_watcher.h
deleted file mode 100644
index 33e4cfcb60912c0ce21c3aacb1a08cf04ba7a8ee..0000000000000000000000000000000000000000
--- a/mojo/message_pump/handle_watcher.h
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright 2013 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.
-
-#ifndef MOJO_MESSAGE_PUMP_HANDLE_WATCHER_H_
-#define MOJO_MESSAGE_PUMP_HANDLE_WATCHER_H_
-
-#include "base/basictypes.h"
-#include "base/callback_forward.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/run_loop.h"
-#include "third_party/mojo/src/mojo/public/cpp/system/core.h"
-
-namespace base {
-class Thread;
-}
-
-namespace mojo {
-namespace common {
-namespace test {
-class HandleWatcherTest;
-}
-
-// HandleWatcher is used to asynchronously wait on a handle and notify a Closure
-// when the handle is ready, or the deadline has expired.
-class HandleWatcher {
- public:
- HandleWatcher();
-
- // The destructor implicitly stops listening. See Stop() for details.
- ~HandleWatcher();
-
- // Starts listening for |handle|. This implicitly invokes Stop(). In other
- // words, Start() performs one asynchronous watch at a time. It is ok to call
- // Start() multiple times, but it cancels any existing watches. |callback| is
- // notified when the handle is ready, invalid or deadline has passed and is
- // notified on the thread Start() was invoked on. If the current thread exits
- // before the handle is ready, then |callback| is invoked with a result of
- // MOJO_RESULT_ABORTED.
- void Start(const Handle& handle,
- MojoHandleSignals handle_signals,
- MojoDeadline deadline,
- const base::Callback<void(MojoResult)>& callback);
-
- // Stops listening. Does nothing if not in the process of listening. Blocks
- // until no longer listening on the handle.
- void Stop();
-
- private:
- class StateBase;
- class SameThreadWatchingState;
- class SecondaryThreadWatchingState;
-
- // If non-NULL Start() has been invoked.
- scoped_ptr<StateBase> state_;
-
- DISALLOW_COPY_AND_ASSIGN(HandleWatcher);
-};
-
-} // namespace common
-} // namespace mojo
-
-#endif // MOJO_MESSAGE_PUMP_HANDLE_WATCHER_H_
« no previous file with comments | « mojo/message_pump/BUILD.gn ('k') | mojo/message_pump/handle_watcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698