Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef BLIMP_NET_INPUT_MESSAGE_GENERATOR_H_ | |
| 6 #define BLIMP_NET_INPUT_MESSAGE_GENERATOR_H_ | |
| 7 | |
| 8 #include "base/macros.h" | |
| 9 #include "base/memory/scoped_ptr.h" | |
| 10 #include "blimp/net/blimp_net_export.h" | |
| 11 | |
| 12 namespace blink { | |
| 13 class WebInputEvent; | |
| 14 } | |
| 15 | |
| 16 namespace blimp { | |
| 17 | |
| 18 class InputMessage; | |
| 19 | |
| 20 // Handles creating serialized InputMessage protos from a stream of | |
| 21 // WebInputEvents. This class may be stateful to optimize the size of the | |
| 22 // serialized transmission data. See InputMessageProcessor for the deserialize | |
| 23 // code. | |
| 24 class BLIMP_NET_EXPORT InputMessageGenerator { | |
| 25 public: | |
| 26 InputMessageGenerator(); | |
| 27 ~InputMessageGenerator(); | |
| 28 | |
| 29 // Create an InputMessage that represents the WebInputEvent |event| and sends | |
| 30 // 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!
| |
| 31 // messages. | |
| 32 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
| |
| 33 | |
| 34 private: | |
| 35 DISALLOW_COPY_AND_ASSIGN(InputMessageGenerator); | |
| 36 }; | |
| 37 | |
| 38 } // namespace blimp | |
| 39 | |
| 40 #endif // BLIMP_NET_INPUT_MESSAGE_GENERATOR_H_ | |
| OLD | NEW |