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

Unified Diff: base/waitable_event_watcher_win.cc

Issue 5977010: Move CancellationFlag and WaitableEvent to the synchronization subdirectory.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 12 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 | « base/waitable_event_watcher_unittest.cc ('k') | base/waitable_event_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/waitable_event_watcher_win.cc
===================================================================
--- base/waitable_event_watcher_win.cc (revision 70364)
+++ base/waitable_event_watcher_win.cc (working copy)
@@ -1,60 +0,0 @@
-// Copyright (c) 2006-2008 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/waitable_event_watcher.h"
-
-#include "base/compiler_specific.h"
-#include "base/waitable_event.h"
-#include "base/win/object_watcher.h"
-
-namespace base {
-
-WaitableEventWatcher::ObjectWatcherHelper::ObjectWatcherHelper(
- WaitableEventWatcher* watcher)
- : watcher_(watcher) {
-};
-
-void WaitableEventWatcher::ObjectWatcherHelper::OnObjectSignaled(HANDLE h) {
- watcher_->OnObjectSignaled();
-}
-
-
-WaitableEventWatcher::WaitableEventWatcher()
- : event_(NULL),
- ALLOW_THIS_IN_INITIALIZER_LIST(helper_(this)),
- delegate_(NULL) {
-}
-
-WaitableEventWatcher::~WaitableEventWatcher() {
-}
-
-bool WaitableEventWatcher::StartWatching(WaitableEvent* event,
- Delegate* delegate) {
- delegate_ = delegate;
- event_ = event;
-
- return watcher_.StartWatching(event->handle(), &helper_);
-}
-
-void WaitableEventWatcher::StopWatching() {
- delegate_ = NULL;
- event_ = NULL;
- watcher_.StopWatching();
-}
-
-WaitableEvent* WaitableEventWatcher::GetWatchedEvent() {
- return event_;
-}
-
-void WaitableEventWatcher::OnObjectSignaled() {
- WaitableEvent* event = event_;
- Delegate* delegate = delegate_;
- event_ = NULL;
- delegate_ = NULL;
- DCHECK(event);
-
- delegate->OnWaitableEventSignaled(event);
-}
-
-} // namespace base
« no previous file with comments | « base/waitable_event_watcher_unittest.cc ('k') | base/waitable_event_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698