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

Side by Side Diff: blimp/net/input_message_converter.h

Issue 2632803002: Remove all blimp network code. (Closed)
Patch Set: merge from origin/master for good measure Created 3 years, 11 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 unified diff | Download patch
« no previous file with comments | « blimp/net/fake_pipe_manager.cc ('k') | blimp/net/input_message_converter.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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_CONVERTER_H_
6 #define BLIMP_NET_INPUT_MESSAGE_CONVERTER_H_
7
8 #include <memory>
9
10 #include "base/macros.h"
11 #include "blimp/common/proto/ime.pb.h"
12 #include "blimp/net/blimp_net_export.h"
13 #include "ui/base/ime/text_input_type.h"
14
15 namespace blink {
16 class WebGestureEvent;
17 }
18
19 namespace blimp {
20
21 class InputMessage;
22
23 // A generic class to provide conversion utilities for protos such as :
24 // 1) Creating WebGestureEvents from a stream of InputMessage protos.
25 // This class may be stateful to optimize the size of the serialized
26 // transmission
27 // data. See InputMessageConverter for the deserialize code.
28 // 2) Conversion between ui::TextInputType and ImeMessage proto.
29 class BLIMP_NET_EXPORT InputMessageConverter {
30 public:
31 InputMessageConverter();
32 ~InputMessageConverter();
33
34 // Process an InputMessage and create a WebGestureEvent from it. This might
35 // make use of state from previous messages.
36 std::unique_ptr<blink::WebGestureEvent> ProcessMessage(
37 const InputMessage& message);
38
39 // Converts a ui::TextInputType to ImeMessage proto.
40 static ImeMessage_InputType TextInputTypeToProto(ui::TextInputType type);
41 static ui::TextInputType TextInputTypeFromProto(ImeMessage_InputType type);
42
43 private:
44 DISALLOW_COPY_AND_ASSIGN(InputMessageConverter);
45 };
46
47 } // namespace blimp
48
49 #endif // BLIMP_NET_INPUT_MESSAGE_CONVERTER_H_
OLDNEW
« no previous file with comments | « blimp/net/fake_pipe_manager.cc ('k') | blimp/net/input_message_converter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698