1 /* -*- Mode: C++; tab-width: 40; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef nsIKeyEventInPluginCallback_h_
7 #define nsIKeyEventInPluginCallback_h_
9 #include "mozilla/EventForwards.h"
11 #include "nsISupports.h"
13 #define NS_IKEYEVENTINPLUGINCALLBACK_IID \
14 { 0x543c5a8a, 0xc50e, 0x4cf9, \
15 { 0xa6, 0xba, 0x29, 0xa1, 0xc5, 0xa5, 0x47, 0x07 } }
18 class nsIKeyEventInPluginCallback
: public nsISupports
21 NS_DECLARE_STATIC_IID_ACCESSOR(NS_IKEYEVENTINPLUGINCALLBACK_IID
)
24 * HandledWindowedPluginKeyEvent() is a callback method of
25 * nsIWidget::OnWindowedPluginKeyEvent(). When it returns
26 * NS_SUCCESS_EVENT_HANDLED_ASYNCHRONOUSLY, it should call this method
27 * when the key event is handled.
29 * @param aKeyEventData The key event which was posted to the parent
30 * process from a plugin process.
31 * @param aIsConsumed true if aKeyEventData is consumed in the
32 * parent process. Otherwise, false.
34 virtual void HandledWindowedPluginKeyEvent(
35 const mozilla::NativeEventData
& aKeyEventData
,
36 bool aIsConsumed
) = 0;
39 NS_DEFINE_STATIC_IID_ACCESSOR(nsIKeyEventInPluginCallback
,
40 NS_IKEYEVENTINPLUGINCALLBACK_IID
)
42 #endif // #ifndef nsIKeyEventInPluginCallback_h_