On Wed, Feb 18, 2009 at 8:18 AM, Avi Drissman <[email protected]> wrote:

> On Wed, Nov 12, 2008 at 7:28 PM, Darin Fisher <[email protected]> wrote:
>
>> The intent was for WebKeyboardEvent to mirror PlatformKeyboardEvent such
>> that conversion between the two was a simple as copying fields directly.
>
>
> The issue with this approach is that PlatformKeyboardEvent is not a simple
> POD class, and is not a "cross-platform" keyboard abstraction as it's
> touted. It's ifdef-ed all over the place per-platform.
>

I think you are referring to these data members:

#if PLATFORM(MAC)
        RetainPtr<NSEvent> m_macEvent;
#endif
#if PLATFORM(WIN) || PLATFORM(CHROMIUM)
        bool m_isSystemKey;
#endif
#if PLATFORM(GTK)
        GdkEventKey* m_gdkEventKey;
#endif
#if PLATFORM(QT)
        QKeyEvent* m_qtEvent;
#endif

Notice that except for a bool, the rest are not part of the structure when
PLATFORM(CHROMIUM) is defined, so for us PlatformKeyboardEvent is platform
independent.

-Darin



>
>
> We *can* treat it as such, though, and it appears we're already trying to
> do so (see the #if PLATFORM(CHROMIUM) on the m_isSystemKey member). That
> means we would haul all the platform code back up from WebCore to glue, and
> keep a duplicated copy. (We couldn't use it directly for various reasons
> enumerated elsewhere.)
>
> On Wed, Nov 12, 2008 at 2:59 PM, Evan Martin <[email protected]> wrote:
>
>> 3) [...]we have code that knows how to serialize
>> those over the IPC layer[...]
>
>
> = reinterpret_cast<const char*> (see RenderWidgetHost::ForwardInputEvent as
> an example).
>
> It's probably the right idea to promote events to being first-class IPC
> citizens.
>
> Avi
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
Chromium Developers mailing list: [email protected] 
View archives, change email options, or unsubscribe: 
    http://groups.google.com/group/chromium-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to