diff options
author | oshima@google.com <oshima@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-05 17:14:33 +0000 |
---|---|---|
committer | oshima@google.com <oshima@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-05 17:14:33 +0000 |
commit | e4dd339604ada87f8479c4d509911feb10b0e7fe (patch) | |
tree | 9419aa990fc8331d48d4a62c4aab4dd7af9c99c1 /base/event_types.h | |
parent | 7a6b150c5b41a4aaf265284b930c96721a1ed15c (diff) | |
download | chromium_src-e4dd339604ada87f8479c4d509911feb10b0e7fe.zip chromium_src-e4dd339604ada87f8479c4d509911feb10b0e7fe.tar.gz chromium_src-e4dd339604ada87f8479c4d509911feb10b0e7fe.tar.bz2 |
Consolidate ui::NativeEvent and base::NativeEvent
Note: I didn't add Wayland version of NativeEvent because the type is defined in ui, which base shouldn't depend on. I looked at the original CL and this typedef in message_pump_wayland seems to be added after reviewer gave LGTM.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/8113028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104123 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/event_types.h')
-rw-r--r-- | base/event_types.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/base/event_types.h b/base/event_types.h new file mode 100644 index 0000000..092ec7f --- /dev/null +++ b/base/event_types.h @@ -0,0 +1,37 @@ +// Copyright (c) 2011 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 BASE_EVENT_TYPES_H +#define BASE_EVENT_TYPES_H +#pragma once + +#include "build/build_config.h" + +#if defined(OS_WIN) +#include <windows.h> +#endif + +#if defined(USE_X11) +typedef union _XEvent XEvent; +#endif + +namespace base { + +// Cross platform typedefs for native event types. +#if defined(OS_WIN) +typedef MSG NativeEvent; +#elif defined(USE_X11) +typedef XEvent* NativeEvent; +#elif defined(USE_WAYLAND) +// WaylandEvent is currently defined in ui component and cannot be +// used in base component. Probably wayland maintainer has to move it +// outside of ui in order to define NativeEvent for wayland here. +typedef void* NativeEvent; +#else +typedef void* NativeEvent; +#endif + +} // namespace base + +#endif // BASE_EVENT_TYPES_H |