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/memory/scoped_ptr.h" | |
| 9 #include "blimp/net/blimp_net_export.h" | |
| 10 | |
| 11 namespace blink { | |
| 12 class WebInputEvent; | |
| 13 } | |
| 14 | |
| 15 namespace blimp { | |
| 16 | |
| 17 class InputMessage; | |
| 18 | |
| 19 // Handles creating serialized InputMessage protos from a stream of | |
| 20 // WebInputEvents. This class may be stateful to optimize the size of the | |
| 21 // serialized transmission data. See InputMessageProcessor for the deserialize | |
| 22 // code. | |
| 23 class BLIMP_NET_EXPORT InputMessageGenerator { | |
| 24 public: | |
| 25 InputMessageGenerator(); | |
| 26 virtual ~InputMessageGenerator(); | |
|
Wez
2015/11/17 01:37:40
nit: Does this need to be virtual? Will we ever su
David Trainor- moved to gerrit
2015/11/17 05:33:14
Good point it doesn't. I should also add DISALLOW
| |
| 27 | |
| 28 // Create an InputMessage that represents the WebInputEvent |event|. This | |
| 29 // might make use of state from previous messages. | |
| 30 void GenerateMessage(const blink::WebInputEvent& event, | |
| 31 InputMessage* message); | |
|
Wez
2015/11/17 01:37:40
Kevin's latest MessageProcessor API takes BlimpMes
David Trainor- moved to gerrit
2015/11/17 05:33:14
Ah yeah I saw that. I wasn't quite sure I could d
Wez
2015/11/18 02:18:32
It's feasible to have two distinct MessageProcesso
David Trainor- moved to gerrit
2015/11/18 08:26:30
Oh sorry I misread your comment! Will add.
David Trainor- moved to gerrit
2015/11/19 00:49:43
Looked into adding it and I think it would be clea
Wez
2015/11/23 22:41:41
There's no requirement for this object to set thos
| |
| 32 }; | |
| 33 | |
| 34 } // namespace blimp | |
| 35 | |
| 36 #endif // BLIMP_NET_INPUT_MESSAGE_GENERATOR_H_ | |
| OLD | NEW |