Chromium Code Reviews| Index: blimp/net/input_message_generator.h |
| diff --git a/blimp/net/input_message_generator.h b/blimp/net/input_message_generator.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..87054709f18b9fc5ed8a1b01576a09a65c26605a |
| --- /dev/null |
| +++ b/blimp/net/input_message_generator.h |
| @@ -0,0 +1,40 @@ |
| +// Copyright 2015 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 BLIMP_NET_INPUT_MESSAGE_GENERATOR_H_ |
| +#define BLIMP_NET_INPUT_MESSAGE_GENERATOR_H_ |
| + |
| +#include "base/macros.h" |
| +#include "base/memory/scoped_ptr.h" |
| +#include "blimp/net/blimp_net_export.h" |
| + |
| +namespace blink { |
| +class WebInputEvent; |
| +} |
| + |
| +namespace blimp { |
| + |
| +class InputMessage; |
| + |
| +// Handles creating serialized InputMessage protos from a stream of |
| +// WebInputEvents. This class may be stateful to optimize the size of the |
| +// serialized transmission data. See InputMessageProcessor for the deserialize |
| +// code. |
| +class BLIMP_NET_EXPORT InputMessageGenerator { |
| + public: |
| + InputMessageGenerator(); |
| + ~InputMessageGenerator(); |
| + |
| + // Create an InputMessage that represents the WebInputEvent |event| and sends |
| + // it to the |message_processor|. This might make use of state from previous |
|
nyquist
2015/11/24 08:12:43
Where is |message_processor|?
David Trainor- moved to gerrit
2015/11/24 20:08:28
Secret!
|
| + // messages. |
| + bool GenerateMessage(const blink::WebInputEvent* event, InputMessage* proto); |
|
Wez
2015/11/23 22:41:41
nit: I think this should be const blink::WebInputE
David Trainor- moved to gerrit
2015/11/24 20:08:28
Won't we have to copy the message into the BlimpMe
|
| + |
| + private: |
| + DISALLOW_COPY_AND_ASSIGN(InputMessageGenerator); |
| +}; |
| + |
| +} // namespace blimp |
| + |
| +#endif // BLIMP_NET_INPUT_MESSAGE_GENERATOR_H_ |