Chromium Code Reviews| Index: mojo/common/message_pump_mojo_handler.h |
| diff --git a/mojo/common/message_pump_mojo_handler.h b/mojo/common/message_pump_mojo_handler.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..84162d107b27b06e4c5e0e1cf2604e483f9c7e1b |
| --- /dev/null |
| +++ b/mojo/common/message_pump_mojo_handler.h |
| @@ -0,0 +1,29 @@ |
| +// 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_COMMON_MESSAGE_PUMP_MOJO_HANDLER_H_ |
| +#define MOJO_COMMON_MESSAGE_PUMP_MOJO_HANDLER_H_ |
| + |
| +#include "mojo/common/mojo_common_export.h" |
| +#include "mojo/public/system/core.h" |
| + |
| +namespace mojo { |
| +namespace common { |
| + |
| +// Used by MessagePumpMojo to notify when a handle is either ready or has become |
| +// invalid. |
| +class MOJO_COMMON_EXPORT MessagePumpMojoHandler { |
| + public: |
| + virtual void OnHandleReady(MojoHandle handle) = 0; |
| + |
| + virtual void OnHandleInvalid(MojoHandle handle, MojoResult result) = 0; |
|
darin (slow to review)
2013/11/09 00:47:50
Perhaps this should be more generic such as OnHand
|
| + |
| + protected: |
| + virtual ~MessagePumpMojoHandler() {} |
| +}; |
| + |
| +} // namespace common |
| +} // namespace mojo |
| + |
| +#endif // MOJO_COMMON_MESSAGE_PUMP_MOJO_HANDLER_H_ |