Bug 983049 part.4 Rename nsDispatchingCallback to mozilla::EventDispatchingCallback r=smaug

This commit is contained in:
Masayuki Nakano 2014-03-18 13:48:20 +09:00
parent 6e0a5b3333
commit bdfb32e049
8 changed files with 19 additions and 17 deletions

View File

@ -29,6 +29,7 @@
#include "nsISelection.h" #include "nsISelection.h"
#include "nsISupports.h" #include "nsISupports.h"
#include "nsPresContext.h" #include "nsPresContext.h"
#include "nsEventDispatcher.h"
namespace mozilla { namespace mozilla {
@ -500,7 +501,7 @@ IMEStateManager::DispatchCompositionEvent(nsINode* aEventTargetNode,
nsPresContext* aPresContext, nsPresContext* aPresContext,
WidgetEvent* aEvent, WidgetEvent* aEvent,
nsEventStatus* aStatus, nsEventStatus* aStatus,
nsDispatchingCallback* aCallBack) EventDispatchingCallback* aCallBack)
{ {
MOZ_ASSERT(aEvent->eventStructType == NS_COMPOSITION_EVENT || MOZ_ASSERT(aEvent->eventStructType == NS_COMPOSITION_EVENT ||
aEvent->eventStructType == NS_TEXT_EVENT); aEvent->eventStructType == NS_TEXT_EVENT);

View File

@ -9,7 +9,6 @@
#include "mozilla/EventForwards.h" #include "mozilla/EventForwards.h"
#include "nsIWidget.h" #include "nsIWidget.h"
class nsDispatchingCallback;
class nsIContent; class nsIContent;
class nsIDOMMouseEvent; class nsIDOMMouseEvent;
class nsINode; class nsINode;
@ -19,6 +18,7 @@ class nsISelection;
namespace mozilla { namespace mozilla {
class EventDispatchingCallback;
class IMEContentObserver; class IMEContentObserver;
class TextCompositionArray; class TextCompositionArray;
class TextComposition; class TextComposition;
@ -94,7 +94,7 @@ public:
nsPresContext* aPresContext, nsPresContext* aPresContext,
WidgetEvent* aEvent, WidgetEvent* aEvent,
nsEventStatus* aStatus, nsEventStatus* aStatus,
nsDispatchingCallback* aCallBack); EventDispatchingCallback* aCallBack);
/** /**
* Get TextComposition from widget. * Get TextComposition from widget.

View File

@ -56,7 +56,7 @@ TextComposition::MatchesNativeContext(nsIWidget* aWidget) const
void void
TextComposition::DispatchEvent(WidgetGUIEvent* aEvent, TextComposition::DispatchEvent(WidgetGUIEvent* aEvent,
nsEventStatus* aStatus, nsEventStatus* aStatus,
nsDispatchingCallback* aCallBack) EventDispatchingCallback* aCallBack)
{ {
if (aEvent->message == NS_COMPOSITION_UPDATE) { if (aEvent->message == NS_COMPOSITION_UPDATE) {
mLastData = aEvent->AsCompositionEvent()->data; mLastData = aEvent->AsCompositionEvent()->data;

View File

@ -18,11 +18,11 @@
#include "mozilla/EventForwards.h" #include "mozilla/EventForwards.h"
#include "mozilla/TextRange.h" #include "mozilla/TextRange.h"
class nsDispatchingCallback;
class nsIEditor; class nsIEditor;
namespace mozilla { namespace mozilla {
class EventDispatchingCallback;
class IMEStateManager; class IMEStateManager;
/** /**
@ -219,7 +219,7 @@ private:
*/ */
void DispatchEvent(WidgetGUIEvent* aEvent, void DispatchEvent(WidgetGUIEvent* aEvent,
nsEventStatus* aStatus, nsEventStatus* aStatus,
nsDispatchingCallback* aCallBack); EventDispatchingCallback* aCallBack);
/** /**
* Calculate composition offset then notify composition update to widget * Calculate composition offset then notify composition update to widget

View File

@ -157,7 +157,7 @@ public:
*/ */
static void HandleEventTargetChain(nsTArray<nsEventTargetChainItem>& aChain, static void HandleEventTargetChain(nsTArray<nsEventTargetChainItem>& aChain,
EventChainPostVisitor& aVisitor, EventChainPostVisitor& aVisitor,
nsDispatchingCallback* aCallback, EventDispatchingCallback* aCallback,
ELMCreationDetector& aCd); ELMCreationDetector& aCd);
/** /**
@ -242,7 +242,7 @@ void
nsEventTargetChainItem::HandleEventTargetChain( nsEventTargetChainItem::HandleEventTargetChain(
nsTArray<nsEventTargetChainItem>& aChain, nsTArray<nsEventTargetChainItem>& aChain,
EventChainPostVisitor& aVisitor, EventChainPostVisitor& aVisitor,
nsDispatchingCallback* aCallback, EventDispatchingCallback* aCallback,
ELMCreationDetector& aCd) ELMCreationDetector& aCd)
{ {
// Save the target so that it can be restored later. // Save the target so that it can be restored later.
@ -379,7 +379,7 @@ nsEventDispatcher::Dispatch(nsISupports* aTarget,
WidgetEvent* aEvent, WidgetEvent* aEvent,
nsIDOMEvent* aDOMEvent, nsIDOMEvent* aDOMEvent,
nsEventStatus* aEventStatus, nsEventStatus* aEventStatus,
nsDispatchingCallback* aCallback, EventDispatchingCallback* aCallback,
nsCOMArray<EventTarget>* aTargets) nsCOMArray<EventTarget>* aTargets)
{ {
PROFILER_LABEL("nsEventDispatcher", "Dispatch"); PROFILER_LABEL("nsEventDispatcher", "Dispatch");

View File

@ -206,19 +206,20 @@ public:
} }
}; };
} // namespace mozilla
/** /**
* If an nsDispatchingCallback object is passed to Dispatch, * If an EventDispatchingCallback object is passed to Dispatch,
* its HandleEvent method is called after handling the default event group, * its HandleEvent method is called after handling the default event group,
* before handling the system event group. * before handling the system event group.
* This is used in nsPresShell. * This is used in nsPresShell.
*/ */
class MOZ_STACK_CLASS nsDispatchingCallback { class MOZ_STACK_CLASS EventDispatchingCallback
{
public: public:
virtual void HandleEvent(mozilla::EventChainPostVisitor& aVisitor) = 0; virtual void HandleEvent(EventChainPostVisitor& aVisitor) = 0;
}; };
} // namespace mozilla
/** /**
* The generic class for event dispatching. * The generic class for event dispatching.
* Must not be used outside Gecko! * Must not be used outside Gecko!
@ -247,7 +248,7 @@ public:
mozilla::WidgetEvent* aEvent, mozilla::WidgetEvent* aEvent,
nsIDOMEvent* aDOMEvent = nullptr, nsIDOMEvent* aDOMEvent = nullptr,
nsEventStatus* aEventStatus = nullptr, nsEventStatus* aEventStatus = nullptr,
nsDispatchingCallback* aCallback = nullptr, mozilla::EventDispatchingCallback* aCallback = nullptr,
nsCOMArray<mozilla::dom::EventTarget>* aTargets = nullptr); nsCOMArray<mozilla::dom::EventTarget>* aTargets = nullptr);
/** /**

View File

@ -4033,7 +4033,7 @@ nsEventStateManager::SetCursor(int32_t aCursor, imgIContainer* aContainer,
return NS_OK; return NS_OK;
} }
class MOZ_STACK_CLASS nsESMEventCB : public nsDispatchingCallback class MOZ_STACK_CLASS nsESMEventCB : public EventDispatchingCallback
{ {
public: public:
nsESMEventCB(nsIContent* aTarget) : mTarget(aTarget) {} nsESMEventCB(nsIContent* aTarget) : mTarget(aTarget) {}

View File

@ -444,7 +444,7 @@ public:
PresShell* mShell; PresShell* mShell;
}; };
class MOZ_STACK_CLASS nsPresShellEventCB : public nsDispatchingCallback class MOZ_STACK_CLASS nsPresShellEventCB : public EventDispatchingCallback
{ {
public: public:
nsPresShellEventCB(PresShell* aPresShell) : mPresShell(aPresShell) {} nsPresShellEventCB(PresShell* aPresShell) : mPresShell(aPresShell) {}