nsEventStatus nsPluginInstanceOwner::ProcessEvent(const nsGUIEvent& anEvent) {  nsEventStatus rv = nsEventStatus_eIgnore; if (!mInstance) return rv;  #if defined(XP_MAC) || defined(XP_MACOSX)  if (mWidget) { nsCOMPtr<nsIPluginWidget> pluginWidget = do_QueryInterface(mWidget); if (pluginWidget && NS_SUCCEEDED(pluginWidget->StartDrawPlugin())) { EventRecord macEvent; EventRecord* event = (EventRecord*)anEvent.nativeMsg; if ((event == NULL) || (event->what == nullEvent)  || (anEvent.message == NS_FOCUS_EVENT_START)      || (anEvent.message == NS_BLUR_CONTENT)           || (anEvent.message == NS_MOUSE_MOVE)             || (anEvent.message == NS_MOUSE_ENTER)) { GUItoMacEvent(anEvent, event, macEvent); event = &macEvent; }  nsPluginPort* pluginPort = FixUpPluginWindow(ePluginPaintIgnore); PRBool eventHandled = PR_FALSE; if (pluginPort) { nsPluginEvent pluginEvent = { event, nsPluginPlatformWindowRef(GetWindowFromPort(pluginPort->port)) };  mInstance->HandleEvent(&pluginEvent, &eventHandled); }  if (eventHandled && !(anEvent.message == NS_MOUSE_LEFT_BUTTON_DOWN && !mContentFocused)) rv = nsEventStatus_eConsumeNoDefault;  pluginWidget->EndDrawPlugin(); }
nsEventStatus ProcessEvent(const nsGUIEvent& anEvent) { return nsEventStatus_eConsumeNoDefault;
nsEventStatus nsPluginInstanceOwner::ProcessEvent(const nsGUIEvent& anEvent){  // printf("nsGUIEvent.message: %d\n", anEvent.message);  nsEventStatus rv = nsEventStatus_eIgnore;  if (!mInstance)   // if mInstance is null, we shouldn't be here    return rv;#if defined(XP_MAC) || defined(XP_MACOSX)  // check for null mWidget  if (mWidget) {    nsCOMPtr<nsIPluginWidget> pluginWidget = do_QueryInterface(mWidget);    if (pluginWidget && NS_SUCCEEDED(pluginWidget->StartDrawPlugin())) {      EventRecord macEvent;      EventRecord* event = (EventRecord*)anEvent.nativeMsg;      if ((event == NULL) || (event->what == nullEvent)  ||           (anEvent.message == NS_FOCUS_EVENT_START)      ||           (anEvent.message == NS_BLUR_CONTENT)           ||           (anEvent.message == NS_MOUSE_MOVE)             ||          (anEvent.message == NS_MOUSE_ENTER)) {        GUItoMacEvent(anEvent, event, macEvent);        event = &macEvent;      }      nsPluginPort* pluginPort = FixUpPluginWindow(ePluginPaintIgnore);      PRBool eventHandled = PR_FALSE;      if (pluginPort) {        nsPluginEvent pluginEvent =          {            event,            nsPluginPlatformWindowRef(GetWindowFromPort(pluginPort->port))          };        mInstance->HandleEvent(&pluginEvent, &eventHandled);      }      if (eventHandled && !(anEvent.message == NS_MOUSE_LEFT_BUTTON_DOWN &&                            !mContentFocused))        rv = nsEventStatus_eConsumeNoDefault;      pluginWidget->EndDrawPlugin();    }  }#endif#ifdef XP_WIN  // this code supports windowless plugins  nsPluginEvent * pPluginEvent = (nsPluginEvent *)anEvent.nativeMsg;  // we can get synthetic events from the nsEventStateManager... these  // have no nativeMsg  if (pPluginEvent) {    PRBool eventHandled = PR_FALSE;    mInstance->HandleEvent(pPluginEvent, &eventHandled);    if (eventHandled)      rv = nsEventStatus_eConsumeNoDefault;  }#endif  return rv;}