Skip to content

Commit 71cb301

Browse files
Bug 920377 part.2 Get rid of nsPluginEvent r=roc
1 parent ff56284 commit 71cb301

9 files changed

+12
-14
lines changed

dom/plugins/base/nsPluginInstanceOwner.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3213,7 +3213,7 @@ void* nsPluginInstanceOwner::FixUpPluginWindow(int32_t inPaintState)
32133213
// Set this before calling ProcessEvent to avoid endless recursion.
32143214
mSentInitialTopLevelWindowEvent = true;
32153215

3216-
nsPluginEvent pluginEvent(true, NS_PLUGIN_FOCUS_EVENT, nullptr);
3216+
WidgetPluginEvent pluginEvent(true, NS_PLUGIN_FOCUS_EVENT, nullptr);
32173217
NPCocoaEvent cocoaEvent;
32183218
InitializeNPCocoaEvent(&cocoaEvent);
32193219
cocoaEvent.type = NPCocoaEventWindowFocusChanged;

widget/EventForwards.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,5 @@ typedef mozilla::InternalTransitionEvent nsTransitionEvent;
138138
typedef mozilla::InternalAnimationEvent nsAnimationEvent;
139139
typedef mozilla::WidgetContentCommandEvent nsContentCommandEvent;
140140
typedef mozilla::WidgetCommandEvent nsCommandEvent;
141-
typedef mozilla::WidgetPluginEvent nsPluginEvent;
142141

143142
#endif // mozilla_EventForwards_h__

widget/MiscEvents.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,5 @@ class WidgetPluginEvent : public WidgetGUIEvent
118118
// TODO: Remove following typedefs
119119
typedef mozilla::WidgetContentCommandEvent nsContentCommandEvent;
120120
typedef mozilla::WidgetCommandEvent nsCommandEvent;
121-
typedef mozilla::WidgetPluginEvent nsPluginEvent;
122121

123122
#endif // mozilla_MiscEvents_h__

widget/cocoa/TextInputHandler.mm

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3737,7 +3737,7 @@ nsCompositionEvent compositionUpdate(true, NS_COMPOSITION_UPDATE,
37373737
cocoaTextEvent.type = NPCocoaEventTextInput;
37383738
cocoaTextEvent.data.text.text = (NPNSString*)text;
37393739

3740-
nsPluginEvent pluginEvent(true, NS_PLUGIN_INPUT_EVENT, mWidget);
3740+
WidgetPluginEvent pluginEvent(true, NS_PLUGIN_INPUT_EVENT, mWidget);
37413741
nsCocoaUtils::InitPluginEvent(pluginEvent, cocoaTextEvent);
37423742
DispatchEvent(pluginEvent);
37433743

@@ -3886,7 +3886,7 @@ nsCompositionEvent compositionUpdate(true, NS_COMPOSITION_UPDATE,
38863886
mPluginComplexTextInputRequested = false;
38873887

38883888
// Send key down event to the plugin.
3889-
nsPluginEvent pluginEvent(true, NS_PLUGIN_INPUT_EVENT, mWidget);
3889+
WidgetPluginEvent pluginEvent(true, NS_PLUGIN_INPUT_EVENT, mWidget);
38903890
NPCocoaEvent cocoaEvent;
38913891
ConvertCocoaKeyEventToNPCocoaEvent(aNativeKeyEvent, cocoaEvent);
38923892
nsCocoaUtils::InitPluginEvent(pluginEvent, cocoaEvent);
@@ -3921,7 +3921,7 @@ nsCompositionEvent compositionUpdate(true, NS_COMPOSITION_UPDATE,
39213921
mPluginComplexTextInputRequested = false;
39223922

39233923
// Send key down event to the plugin.
3924-
nsPluginEvent pluginEvent(true, NS_PLUGIN_INPUT_EVENT, mWidget);
3924+
WidgetPluginEvent pluginEvent(true, NS_PLUGIN_INPUT_EVENT, mWidget);
39253925
NPCocoaEvent cocoaEvent;
39263926
ConvertCocoaKeyEventToNPCocoaEvent(aNativeKeyEvent, cocoaEvent);
39273927
nsCocoaUtils::InitPluginEvent(pluginEvent, cocoaEvent);
@@ -4021,7 +4021,7 @@ nsCompositionEvent compositionUpdate(true, NS_COMPOSITION_UPDATE,
40214021
cocoaTextEvent.type = NPCocoaEventTextInput;
40224022
cocoaTextEvent.data.text.text = (NPNSString*)aString;
40234023

4024-
nsPluginEvent pluginEvent(true, NS_PLUGIN_INPUT_EVENT, mWidget);
4024+
WidgetPluginEvent pluginEvent(true, NS_PLUGIN_INPUT_EVENT, mWidget);
40254025
nsCocoaUtils::InitPluginEvent(pluginEvent, cocoaTextEvent);
40264026
return DispatchEvent(pluginEvent);
40274027

widget/cocoa/nsChildView.mm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2934,7 +2934,7 @@ - (void)updatePluginTopLevelWindowStatus:(BOOL)hasMain
29342934
if (!mGeckoChild)
29352935
return;
29362936

2937-
nsPluginEvent pluginEvent(true, NS_PLUGIN_FOCUS_EVENT, mGeckoChild);
2937+
WidgetPluginEvent pluginEvent(true, NS_PLUGIN_FOCUS_EVENT, mGeckoChild);
29382938
NPCocoaEvent cocoaEvent;
29392939
nsCocoaUtils::InitNPCocoaEvent(&cocoaEvent);
29402940
cocoaEvent.type = NPCocoaEventWindowFocusChanged;
@@ -5326,7 +5326,7 @@ - (BOOL)updatePluginFocusStatus:(BOOL)getFocus
53265326
return NO;
53275327

53285328
if (mPluginEventModel == NPEventModelCocoa) {
5329-
nsPluginEvent pluginEvent(true, NS_PLUGIN_FOCUS_EVENT, mGeckoChild);
5329+
WidgetPluginEvent pluginEvent(true, NS_PLUGIN_FOCUS_EVENT, mGeckoChild);
53305330
NPCocoaEvent cocoaEvent;
53315331
nsCocoaUtils::InitNPCocoaEvent(&cocoaEvent);
53325332
cocoaEvent.type = NPCocoaEventFocusChanged;

widget/cocoa/nsCocoaUtils.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ class nsCocoaUtils
286286
/**
287287
* Initializes aPluginEvent for aCocoaEvent.
288288
*/
289-
static void InitPluginEvent(nsPluginEvent &aPluginEvent,
289+
static void InitPluginEvent(mozilla::WidgetPluginEvent &aPluginEvent,
290290
NPCocoaEvent &aCocoaEvent);
291291
/**
292292
* Initializes nsInputEvent for aNativeEvent or aModifiers.

widget/cocoa/nsCocoaUtils.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@
420420

421421
// static
422422
void
423-
nsCocoaUtils::InitPluginEvent(nsPluginEvent &aPluginEvent,
423+
nsCocoaUtils::InitPluginEvent(WidgetPluginEvent &aPluginEvent,
424424
NPCocoaEvent &aCocoaEvent)
425425
{
426426
aPluginEvent.time = PR_IntervalNow();

widget/nsGUIEventIPC.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -487,9 +487,9 @@ struct ParamTraits<nsIMEUpdatePreference>
487487
};
488488

489489
template<>
490-
struct ParamTraits<nsPluginEvent>
490+
struct ParamTraits<mozilla::WidgetPluginEvent>
491491
{
492-
typedef nsPluginEvent paramType;
492+
typedef mozilla::WidgetPluginEvent paramType;
493493

494494
static void Write(Message* aMsg, const paramType& aParam)
495495
{

widget/windows/nsWindowBase.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class nsWindowBase : public nsBaseWidget
6363
if (!PluginHasFocus()) {
6464
return false;
6565
}
66-
nsPluginEvent pluginEvent(true, NS_PLUGIN_INPUT_EVENT, this);
66+
mozilla::WidgetPluginEvent pluginEvent(true, NS_PLUGIN_INPUT_EVENT, this);
6767
nsIntPoint point(0, 0);
6868
InitEvent(pluginEvent, &point);
6969
NPEvent npEvent;

0 commit comments

Comments
 (0)