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

Unified Diff: blimp/common/input/input_event_conversions.h

Issue 1426993008: Serialize a subset of WebInputEvents to protobufs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 5 years, 1 month 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
« no previous file with comments | « blimp/common/DEPS ('k') | blimp/common/input/input_event_conversions.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: blimp/common/input/input_event_conversions.h
diff --git a/blimp/common/input/input_event_conversions.h b/blimp/common/input/input_event_conversions.h
new file mode 100644
index 0000000000000000000000000000000000000000..d58b96e26151829a794a110479460bd270c42879
--- /dev/null
+++ b/blimp/common/input/input_event_conversions.h
@@ -0,0 +1,30 @@
+// 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_COMMON_INPUT_INPUT_EVENT_CONVERSIONS_H_
+#define BLIMP_COMMON_INPUT_INPUT_EVENT_CONVERSIONS_H_
+
+#include "base/memory/scoped_ptr.h"
+#include "blimp/common/blimp_common_export.h"
+
+namespace blink {
+class WebInputEvent;
+}
+
+namespace blimp {
+
+class InputMessage;
+
+// Convert a blink::WebInputEvent to an InputMessage proto.
+BLIMP_COMMON_EXPORT void WebInputEventToProto(const blink::WebInputEvent& event,
+ InputMessage* proto);
Wez 2015/11/16 21:25:47 In general there won't be a 1:1 correspondence bet
David Trainor- moved to gerrit 2015/11/17 01:05:00 Ah good idea.
+
+// Convert an InputMessage proto to a blink::WebInputEvent. |nullptr| is
+// returned if the event could not be deserialized.
+BLIMP_COMMON_EXPORT scoped_ptr<blink::WebInputEvent> ProtoToWebInputEvent(
+ const InputMessage& proto);
+
+} // namespace blimp
+
+#endif // BLIMP_COMMON_INPUT_INPUT_EVENT_CONVERSIONS_H_
« no previous file with comments | « blimp/common/DEPS ('k') | blimp/common/input/input_event_conversions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698