Index: content/browser/devtools/protocol/native_input_event_builder.h |
diff --git a/content/browser/devtools/protocol/native_input_event_builder.h b/content/browser/devtools/protocol/native_input_event_builder.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..13f48a8b8f45683ec6210b171d0bc529f2d08067 |
--- /dev/null |
+++ b/content/browser/devtools/protocol/native_input_event_builder.h |
@@ -0,0 +1,29 @@ |
+// Copyright 2017 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 CONTENT_BROWSER_DEVTOOLS_PROTOCOL_NATIVE_INPUT_EVENT_BUILDER_H_ |
+#define CONTENT_BROWSER_DEVTOOLS_PROTOCOL_NATIVE_INPUT_EVENT_BUILDER_H_ |
+ |
+#include "content/public/browser/native_web_keyboard_event.h" |
+ |
+namespace content { |
+namespace protocol { |
+ |
+class NativeInputEventBuilder { |
+ public: |
+#if defined(OS_MACOSX) |
+ static gfx::NativeEvent Build(const NativeWebKeyboardEvent& event); |
pfeldman
2017/02/10 22:59:07
These are the same, ifdef in mm instead.
allada
2017/02/14 02:48:06
Per our offline talk, the optimizer should optimiz
|
+#else |
+ // We only need this for Macs because they require an OS event to process |
+ // some keyboard events in browser (see: crbug.com/667387). |
+ static gfx::NativeEvent Build(const NativeWebKeyboardEvent& event) { |
+ return nullptr; |
+ } |
+#endif |
+}; |
+ |
+} // namespace protocol |
+} // namespace content |
+ |
+#endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_NATIVE_INPUT_EVENT_BUILDER_H_ |