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

Unified Diff: base/message_pump_win.h

Issue 10831271: [Chromoting] Adding uiAccess='true' to the remoting_me2me_host.exe's manifest as it is required to … (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased + a couple of merge fixes. Created 8 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 | « base/message_loop.cc ('k') | base/message_pump_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/message_pump_win.h
diff --git a/base/message_pump_win.h b/base/message_pump_win.h
index e778e01fb2abab53971dd93b3cdb9780e080cecb..fd461988ed9527569ff66849983306c8c868e790 100644
--- a/base/message_pump_win.h
+++ b/base/message_pump_win.h
@@ -296,6 +296,12 @@ class BASE_EXPORT MessagePumpForIO : public MessagePumpWin {
// |handler| must be valid as long as there is pending IO for the given file.
void RegisterIOHandler(HANDLE file_handle, IOHandler* handler);
+ // Register the handler to be used to process job events. The registration
+ // persists as long as the job object is live, so |handler| must be valid
+ // until the job object is destroyed. Returns true if the registration
+ // succeeded, and false otherwise.
+ bool RegisterJobObject(HANDLE job_handle, IOHandler* handler);
+
// Waits for the next IO completion that should be processed by |filter|, for
// up to |timeout| milliseconds. Return true if any IO operation completed,
// regardless of the involved handler, and false if the timeout expired. If
@@ -316,6 +322,11 @@ class BASE_EXPORT MessagePumpForIO : public MessagePumpWin {
IOContext* context;
DWORD bytes_transfered;
DWORD error;
+
+ // In some cases |context| can be a non-pointer value casted to a pointer.
+ // |has_valid_io_context| is true if |context| is a valid IOContext
+ // pointer, and false otherwise.
+ bool has_valid_io_context;
};
virtual void DoRunLoop();
@@ -326,6 +337,14 @@ class BASE_EXPORT MessagePumpForIO : public MessagePumpWin {
void WillProcessIOEvent();
void DidProcessIOEvent();
+ // Converts an IOHandler pointer to a completion port key.
+ // |has_valid_io_context| specifies whether completion packets posted to
+ // |handler| will have valid OVERLAPPED pointers.
+ static ULONG_PTR HandlerToKey(IOHandler* handler, bool has_valid_io_context);
+
+ // Converts a completion port key to an IOHandler pointer.
+ static IOHandler* KeyToHandler(ULONG_PTR key, bool* has_valid_io_context);
+
// The completion port associated with this thread.
win::ScopedHandle port_;
// This list will be empty almost always. It stores IO completions that have
« no previous file with comments | « base/message_loop.cc ('k') | base/message_pump_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698