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

Unified Diff: blimp/net/input_message_converter.h

Issue 1779673003: Added network components for blimp text input feature (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed initial values for tab id in ImeFeature Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: blimp/net/input_message_converter.h
diff --git a/blimp/net/input_message_converter.h b/blimp/net/input_message_converter.h
index 53606c148f6929018980ae773f790b59caa1e7e8..7d2121687e63cf42a39d4cec1d04a948cfb83f45 100644
--- a/blimp/net/input_message_converter.h
+++ b/blimp/net/input_message_converter.h
@@ -7,7 +7,9 @@
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
+#include "blimp/common/proto/ime.pb.h"
#include "blimp/net/blimp_net_export.h"
+#include "ui/base/ime/text_input_type.h"
namespace blink {
class WebGestureEvent;
@@ -17,9 +19,12 @@ namespace blimp {
class InputMessage;
-// Handles creating WebGestureEvents from a stream of InputMessage protos. This
-// class may be stateful to optimize the size of the serialized transmission
-// data. See InputMessageConverter for the deserialize code.
+// A generic class to provide conversion utilities for protos such as :
+// 1) Creating WebGestureEvents from a stream of InputMessage protos.
+// This class may be stateful to optimize the size of the serialized
+// transmission
+// data. See InputMessageConverter for the deserialize code.
+// 2) Conversion between ui::TextInputType and ImeMessage proto.
class BLIMP_NET_EXPORT InputMessageConverter {
public:
InputMessageConverter();
@@ -30,6 +35,10 @@ class BLIMP_NET_EXPORT InputMessageConverter {
scoped_ptr<blink::WebGestureEvent> ProcessMessage(
const InputMessage& message);
+ // Converts a ui::TextInputType to ImeMessage proto.
+ static ImeMessage_InputType TextInputTypeToProto(ui::TextInputType type);
+ static ui::TextInputType TextInputTypeFromProto(ImeMessage_InputType type);
+
private:
DISALLOW_COPY_AND_ASSIGN(InputMessageConverter);
};
« blimp/net/DEPS ('K') | « blimp/net/DEPS ('k') | blimp/net/input_message_converter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698