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

Unified Diff: content/public/browser/native_web_keyboard_event.h

Issue 739993002: MacViews: Fix build errors related to NativeWebKeyboardEvent (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and fix for Sadrul Created 6 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
Index: content/public/browser/native_web_keyboard_event.h
diff --git a/content/public/browser/native_web_keyboard_event.h b/content/public/browser/native_web_keyboard_event.h
index b890c1d2d63656312fac3a7065097f71cd7bac58..fc7c7325c96411913fbf329c98e4662fefea8dc1 100644
--- a/content/public/browser/native_web_keyboard_event.h
+++ b/content/public/browser/native_web_keyboard_event.h
@@ -13,6 +13,10 @@
#include "ui/events/event_constants.h"
#include "ui/gfx/native_widget_types.h"
+namespace ui {
+class KeyEvent;
+}
+
namespace content {
// Owns a platform specific event; used to pass own and pass event through
@@ -22,21 +26,7 @@ struct CONTENT_EXPORT NativeWebKeyboardEvent :
NativeWebKeyboardEvent();
explicit NativeWebKeyboardEvent(gfx::NativeEvent native_event);
-#if defined(USE_AURA)
- NativeWebKeyboardEvent(ui::EventType type,
- bool is_char,
- wchar_t character,
- int state,
- double time_stamp_seconds);
-#elif defined(OS_MACOSX)
- // TODO(suzhe): Limit these constructors to Linux native Gtk port.
- // For Linux Views port, after using RenderWidgetHostViewViews to replace
- // RenderWidgetHostViewGtk, we can use constructors for TOOLKIT_VIEWS defined
- // below.
- NativeWebKeyboardEvent(wchar_t character,
- int state,
- double time_stamp_seconds);
-#elif defined(OS_ANDROID)
+#if defined(OS_ANDROID)
NativeWebKeyboardEvent(blink::WebInputEvent::Type type,
int modifiers,
double time_secs,
@@ -51,6 +41,15 @@ struct CONTENT_EXPORT NativeWebKeyboardEvent :
int keycode,
int unicode_character,
bool is_system_key);
+#else
+ explicit NativeWebKeyboardEvent(const ui::KeyEvent& key_event);
+#if defined(USE_AURA)
+ NativeWebKeyboardEvent(ui::EventType type,
+ bool is_char,
+ wchar_t character,
+ int state,
+ double time_stamp_seconds);
+#endif
#endif
NativeWebKeyboardEvent(const NativeWebKeyboardEvent& event);
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_aura.cc ('k') | content/renderer/render_view_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698