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

Side by Side Diff: base/win/object_watcher.cc

Issue 5971008: move base/object_watcher into base/win and add the win namespace. Fixup calle... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/win/object_watcher.h ('k') | base/win/object_watcher_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/object_watcher.h" 5 #include "base/win/object_watcher.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 namespace base { 9 namespace base {
10 namespace win {
10 11
11 //----------------------------------------------------------------------------- 12 //-----------------------------------------------------------------------------
12 13
13 struct ObjectWatcher::Watch : public Task { 14 struct ObjectWatcher::Watch : public Task {
14 ObjectWatcher* watcher; // The associated ObjectWatcher instance 15 ObjectWatcher* watcher; // The associated ObjectWatcher instance
15 HANDLE object; // The object being watched 16 HANDLE object; // The object being watched
16 HANDLE wait_object; // Returned by RegisterWaitForSingleObject 17 HANDLE wait_object; // Returned by RegisterWaitForSingleObject
17 MessageLoop* origin_loop; // Used to get back to the origin thread 18 MessageLoop* origin_loop; // Used to get back to the origin thread
18 Delegate* delegate; // Delegate to notify when signaled 19 Delegate* delegate; // Delegate to notify when signaled
19 bool did_signal; // DoneWaiting was called 20 bool did_signal; // DoneWaiting was called
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 // on the target thread. 129 // on the target thread.
129 watch->origin_loop->PostTask(FROM_HERE, watch); 130 watch->origin_loop->PostTask(FROM_HERE, watch);
130 } 131 }
131 132
132 void ObjectWatcher::WillDestroyCurrentMessageLoop() { 133 void ObjectWatcher::WillDestroyCurrentMessageLoop() {
133 // Need to shutdown the watch so that we don't try to access the MessageLoop 134 // Need to shutdown the watch so that we don't try to access the MessageLoop
134 // after this point. 135 // after this point.
135 StopWatching(); 136 StopWatching();
136 } 137 }
137 138
139 } // namespace win
138 } // namespace base 140 } // namespace base
OLDNEW
« no previous file with comments | « base/win/object_watcher.h ('k') | base/win/object_watcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698