Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Static Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | Static Private Attributes
MRJPluginInstance Class Reference

#include <MRJPlugin.h>

Inheritance diagram for MRJPluginInstance:
Inheritance graph
[legend]
Collaboration diagram for MRJPluginInstance:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 MRJPluginInstance (MRJPlugin *plugin)
virtual ~MRJPluginInstance ()
DECL_SUPPORTS_MIXIN NS_IMETHOD HandleEvent (nsPluginEvent *event, PRBool *handled)
NS_IMETHOD Initialize (nsIPluginInstancePeer *peer)
 Initializes a newly created plugin instance, passing to it the plugin instance peer which it should use for all communication back to the browser.
NS_IMETHOD GetPeer (nsIPluginInstancePeer **result)
 Returns a reference back to the plugin instance peer.
NS_IMETHOD Start (void)
 Called to instruct the plugin instance to start.
NS_IMETHOD Stop (void)
 Called to instruct the plugin instance to stop, thereby suspending its state.
NS_IMETHOD Destroy (void)
 Called to instruct the plugin instance to destroy itself.
NS_IMETHOD SetWindow (nsPluginWindow *window)
 Called when the window containing the plugin instance changes.
NS_IMETHOD NewStream (nsIPluginStreamListener **listener)
 Called to tell the plugin that the initial src/data stream is ready.
NS_IMETHOD Print (nsPluginPrint *platformPrint)
 Called to instruct the plugin instance to print itself to a printer.
NS_IMETHOD GetValue (nsPluginInstanceVariable variable, void *value)
 Returns the value of a variable associated with the plugin instance.
NS_IMETHOD GetJavaObject (jobject *result)
NS_IMETHOD GetText (const char **result)
NS_IMETHOD OnStartBinding (nsIPluginStreamInfo *pluginInfo)
 Notify the observer that the URL has started to load.
NS_IMETHOD OnDataAvailable (nsIPluginStreamInfo *pluginInfo, nsIInputStream *input, PRUint32 length)
 Notify the client that data is available in the input stream.
NS_IMETHOD OnFileAvailable (nsIPluginStreamInfo *pluginInfo, const char *fileName)
NS_IMETHOD OnStopBinding (nsIPluginStreamInfo *pluginInfo, nsresult status)
 Notify the observer that the URL has finished loading.
NS_IMETHOD GetStreamType (nsPluginStreamType *result)
 What is this method supposed to do?
MRJPluginInstancegetNextInstance (void)
MRJContextgetContext (void)
MRJSessiongetSession (void)
 MRJPluginInstance (MRJPlugin *plugin)
virtual ~MRJPluginInstance ()
DECL_SUPPORTS_MIXIN NS_IMETHOD HandleEvent (nsPluginEvent *event, PRBool *handled)
NS_IMETHOD Initialize (nsIPluginInstancePeer *peer)
 Initializes a newly created plugin instance, passing to it the plugin instance peer which it should use for all communication back to the browser.
NS_IMETHOD GetPeer (nsIPluginInstancePeer **result)
 Returns a reference back to the plugin instance peer.
NS_IMETHOD Start (void)
 Called to instruct the plugin instance to start.
NS_IMETHOD Stop (void)
 Called to instruct the plugin instance to stop, thereby suspending its state.
NS_IMETHOD Destroy (void)
 Called to instruct the plugin instance to destroy itself.
NS_IMETHOD SetWindow (nsPluginWindow *window)
 Called when the window containing the plugin instance changes.
NS_IMETHOD NewStream (nsIPluginStreamListener **listener)
 Called to tell the plugin that the initial src/data stream is ready.
NS_IMETHOD Print (nsPluginPrint *platformPrint)
 Called to instruct the plugin instance to print itself to a printer.
NS_IMETHOD GetValue (nsPluginInstanceVariable variable, void *value)
 Returns the value of a variable associated with the plugin instance.
NS_IMETHOD GetJavaObject (jobject *result)
NS_IMETHOD GetText (const char **result)
NS_IMETHOD OnStartBinding (nsIPluginStreamInfo *pluginInfo)
 Notify the observer that the URL has started to load.
NS_IMETHOD OnDataAvailable (nsIPluginStreamInfo *pluginInfo, nsIInputStream *input, PRUint32 length)
 Notify the client that data is available in the input stream.
NS_IMETHOD OnFileAvailable (nsIPluginStreamInfo *pluginInfo, const char *fileName)
NS_IMETHOD OnStopBinding (nsIPluginStreamInfo *pluginInfo, nsresult status)
 Notify the observer that the URL has finished loading.
NS_IMETHOD GetStreamType (nsPluginStreamType *result)
 What is this method supposed to do?
MRJPluginInstancegetNextInstance (void)
MRJContextgetContext (void)
MRJSessiongetSession (void)
void initialize (in nsIPluginInstancePeer aPeer)
 Initializes a newly created plugin instance, passing to it the plugin instance peer which it should use for all communication back to the browser.
void start ()
 Called to instruct the plugin instance to start.
void stop ()
 Called to instruct the plugin instance to stop, thereby suspending its state.
void destroy ()
 Called to instruct the plugin instance to destroy itself.
void setWindow (in nsPluginWindowPtr aWindow)
 Called when the window containing the plugin instance changes.
void newStream (out nsIPluginStreamListener aListener)
 Called to tell the plugin that the initial src/data stream is ready.
void print (in nsPluginPrintPtr aPlatformPrint)
 Called to instruct the plugin instance to print itself to a printer.
void getValue (in nsPluginInstanceVariable aVariable, in voidPtr aValue)
 Returns the value of a variable associated with the plugin instance.
void handleEvent (in nsPluginEventPtr aEvent, out boolean aHandled)
 Handles an event.
void GetJavaObject (out jobject result)
void GetText (in nChar result)
void handleEvent (in nsPluginEventPtr aEvent, out boolean aHandled)
 Handles an event.
void onStartBinding (in nsIPluginStreamInfo aPluginInfo)
 Notify the observer that the URL has started to load.
void onDataAvailable (in nsIPluginStreamInfo aPluginInfo, in nsIInputStream aInputStream, in unsigned long aLength)
 Notify the client that data is available in the input stream.
void onFileAvailable (in nsIPluginStreamInfo aPluginInfo, in string aFileName)
 Notify the client that data is available in the file.
void onStopBinding (in nsIPluginStreamInfo aPluginInfo, in nsresult aStatus)
 Notify the observer that the URL has finished loading.

Static Public Member Functions

static MRJPluginInstancegetInstances (void)
static MRJPluginInstancegetInstances (void)

Public Attributes

readonly attribute
nsIPluginInstancePeer 
peer
 Returns a reference back to the plugin instance peer.
readonly attribute
nsPluginStreamType 
streamType
 Gets the type of the stream.

Private Member Functions

void pushInstance (void)
void popInstance (void)
void inspectInstance (Boolean isUpdateEvt)
void pushInstance (void)
void popInstance (void)
void inspectInstance (Boolean isUpdateEvt)
nsresult queryInterface (const nsIID &aIID, void **aInstancePtr)
 The lowercase implementations of queryInterface, addRef, and release all act locally on the current object, regardless of aggregation.
nsresult queryInterface (const nsIID &aIID, void **aInstancePtr)
nsrefcnt addRef (void)
nsrefcnt addRef (void)
nsrefcnt release (void)
nsrefcnt release (void)

Private Attributes

nsIPluginInstancePeermPeer
nsIWindowlessPluginInstancePeermWindowlessPeer
MRJPluginmPlugin
MRJSessionmSession
MRJContextmContext
jobject mApplet
nsPluginWindowmPluginWindow
MRJPluginInstancemNext

Static Private Attributes

static const InterfaceInfo sInterfaces []
static const UInt32 kInterfaceCount = sizeof(sInterfaces) / sizeof(InterfaceInfo)

Detailed Description

Definition at line 271 of file MRJPlugin.h.


Constructor & Destructor Documentation

Definition at line 602 of file MRJPlugin.cpp.

       :      SupportsMixin(this, sInterfaces, kInterfaceCount),
              mPeer(NULL), mWindowlessPeer(NULL),
              mPlugin(plugin), mSession(plugin->getSession()),
              mContext(NULL), mApplet(NULL), mPluginWindow(NULL),
              mNext(NULL)
{
       // add this instance to the instance list.
       pushInstance();

       // Tell the plugin we are retaining a reference.
       mPlugin->AddRef();
}

Here is the call graph for this function:

Definition at line 616 of file MRJPlugin.cpp.

{
    // Remove this instance from the global list.
    popInstance();

#if 0
    delete mContext;

    if (mPlugin != NULL) {
        mPlugin->Release();
    }

    if (mWindowlessPeer != NULL) {
        mWindowlessPeer->Release();
    }

    if (mPeer != NULL) {
        mPeer->Release();
    }

    if (mApplet != NULL) {
        JNIEnv* env = mSession->getCurrentEnv();
        env->DeleteGlobalRef(mApplet);
    }
#endif
}

Here is the call graph for this function:


Member Function Documentation

nsrefcnt SupportsMixin::addRef ( void  ) [inherited]

Here is the caller graph for this function:

nsrefcnt SupportsMixin::addRef ( void  ) [inherited]

Called to instruct the plugin instance to destroy itself.

This is called when it become no longer possible to return to the plugin instance, either because the browser window's history list of pages is being trimmed, or because the window containing this page in the history is being closed.

Returns:
- NS_OK if this operation was successful

Called to instruct the plugin instance to destroy itself.

This is called when it become no longer possible to return to the plugin instance, either because the browser window's history list of pages is being trimmed, or because the window containing this page in the history is being closed.

Returns:
- NS_OK if this operation was successful

Called to instruct the plugin instance to destroy itself.

This is called when it become no longer possible to return to the plugin instance, either because the browser window's history list of pages is being trimmed, or because the window containing this page in the history is being closed.

Returns:
- NS_OK if this operation was successful

Definition at line 737 of file MRJPlugin.cpp.

{
       // Use this opportunity to break any cycles that might exist, and reduce
       // reference counts to their minimum values.
       if (mContext != NULL) {
              delete mContext;
              mContext = NULL;
       }

       if (mPlugin != NULL) {
              mPlugin->Release();
              mPlugin = NULL;
       }

       if (mWindowlessPeer != NULL) {
              mWindowlessPeer->Release();
              mWindowlessPeer = NULL;
       }

       if (mPeer != NULL) {
              mPeer->Release();
              mPeer = NULL;
       }

       if (mApplet != NULL) {
              JNIEnv* env = mSession->getCurrentEnv();
              env->DeleteGlobalRef(mApplet);
              mApplet = NULL;
       }

       return NS_OK;
}

Here is the call graph for this function:

Definition at line 916 of file MRJPlugin.cpp.

{
       return mContext;
}

Here is the caller graph for this function:

Definition at line 906 of file MRJPlugin.cpp.

{
       return theInstances;
}

Here is the caller graph for this function:

Definition at line 870 of file MRJPlugin.cpp.

{
       if (mApplet == NULL) {
              jobject applet = mContext->getApplet();
              JNIEnv* env = mSession->getCurrentEnv();
              mApplet = env->NewGlobalRef(applet);
       }
       *result = mApplet;
       return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 911 of file MRJPlugin.cpp.

{
       return mNext;
}

Here is the caller graph for this function:

Returns a reference back to the plugin instance peer.

This method is used whenever the browser needs to obtain the peer back from a plugin instance. The implementation of this method should be sure to increment the reference count on the peer by calling AddRef.

Parameters:
resultingPeer- the resulting plugin instance peer
Returns:
- NS_OK if this operation was successful

Returns a reference back to the plugin instance peer.

This method is used whenever the browser needs to obtain the peer back from a plugin instance. The implementation of this method should be sure to increment the reference count on the peer by calling AddRef.

Parameters:
resultingPeer- the resulting plugin instance peer
Returns:
- NS_OK if this operation was successful

Definition at line 710 of file MRJPlugin.cpp.

{
       mPeer->AddRef();
       *result = mPeer;
       return NS_OK;
}

Here is the caller graph for this function:

Definition at line 921 of file MRJPlugin.cpp.

{
       return mSession;
}

Here is the caller graph for this function:

What is this method supposed to do?

Definition at line 451 of file MRJPlugin.h.

What is this method supposed to do?

Definition at line 458 of file MRJPlugin.h.

void nsIJVMPluginInstance::GetText ( in nChar  result) [inherited]
NS_IMETHOD MRJPluginInstance::GetText ( const char **  result) [inline]

Definition at line 390 of file MRJPlugin.h.

    {
        *result = NULL;
        return NS_OK;
    }
NS_IMETHOD MRJPluginInstance::GetText ( const char **  result) [inline]

Definition at line 397 of file MRJPlugin.h.

    {
        *result = NULL;
       return NS_OK;
    }
void nsIPluginInstance::getValue ( in nsPluginInstanceVariable  aVariable,
in voidPtr  aValue 
) [inherited]

Returns the value of a variable associated with the plugin instance.

Parameters:
aVariable- the plugin instance variable to get
aValue- the address of where to store the resulting value
Returns:
- NS_OK if this operation was successful

Returns the value of a variable associated with the plugin instance.

Parameters:
variable- the plugin instance variable to get
value- the address of where to store the resulting value
Returns:
- NS_OK if this operation was successful

Returns the value of a variable associated with the plugin instance.

Parameters:
variable- the plugin instance variable to get
value- the address of where to store the resulting value
Returns:
- NS_OK if this operation was successful

Definition at line 854 of file MRJPlugin.cpp.

void nsIEventHandler::handleEvent ( in nsPluginEventPtr  aEvent,
out boolean  aHandled 
) [inherited]

Handles an event.

An nsIEventHandler can also get registered with with nsIPluginManager2::RegisterWindow and will be called whenever an event comes in for that window.

Note that for Unix and Mac the nsPluginEvent structure is different from the old NPEvent structure -- it's no longer the native event record, but is instead a struct. This was done for future extensibility, and so that the Mac could receive the window argument too. For Windows and OS2, it's always been a struct, so there's no change for them.

(Corresponds to NPP_HandleEvent.)

Parameters:
aEvent- the event to be handled
aHandled- set to PR_TRUE if event was handled
Returns:
- NS_OK if this operation was successful
void nsIPluginInstance::handleEvent ( in nsPluginEventPtr  aEvent,
out boolean  aHandled 
) [inherited]

Handles an event.

An nsIEventHandler can also get registered with with nsIPluginManager2::RegisterWindow and will be called whenever an event comes in for that window.

Note that for Unix and Mac the nsPluginEvent structure is different from the old NPEvent structure -- it's no longer the native event record, but is instead a struct. This was done for future extensibility, and so that the Mac could receive the window argument too. For Windows and OS2, it's always been a struct, so there's no change for them.

(Corresponds to NPP_HandleEvent.)

Parameters:
aEvent- the event to be handled
aHandled- set to PR_TRUE if event was handled
Returns:
- NS_OK if this operation was successful

Definition at line 781 of file MRJPlugin.cpp.

{
       *eventHandled = PR_TRUE;
       Boolean isUpdate;

       if (pluginEvent != NULL) {
              EventRecord* event = pluginEvent->event;

#if 0
              // Check for clipping changes.
              if (event->what == nsPluginEventType_ClippingChangedEvent) {
                     mContext->setClipping(RgnHandle(event->message));
                     return NS_OK;
              }
#else
              // Check for coordinate/clipping changes.
              isUpdate = (event->what == updateEvt);
              inspectInstance(isUpdate);
#endif
       
              if (event->what == nullEvent) {
                     // Give MRJ another quantum of time.
                     mSession->idle(kDefaultJMTime);    // now SpendTime does this.

#if 0                
                     // check for pending update events.
                     if (CheckUpdate(event)) {
                            MRJFrame* frame = mContext->findFrame(WindowRef(event->message));
                            if (frame != NULL)
                                   frame->update();
                     }
#endif

              } else {
                     MRJFrame* frame = mContext->findFrame(WindowRef(pluginEvent->window));
                     if (frame != NULL) {
                            switch (event->what) {
                            case nsPluginEventType_GetFocusEvent:
                                   frame->focusEvent(true);
                                   break;
                            
                            case nsPluginEventType_LoseFocusEvent:
                                   frame->focusEvent(false);
                                   break;

                            case nsPluginEventType_AdjustCursorEvent:
                                   frame->idle(event->modifiers);
                                   break;
                            
                            case nsPluginEventType_MenuCommandEvent:
                                   frame->menuSelected(event->message, event->modifiers);
                                   break;
                                   
                            default:
                                   *eventHandled = frame->handleEvent(event);
                                   break;
                            }
                     }
              }
       }
       
       return NS_OK;
}

Here is the call graph for this function:

Initializes a newly created plugin instance, passing to it the plugin instance peer which it should use for all communication back to the browser.

Parameters:
aPeer- the corresponding plugin instance peer
Returns:
- NS_OK if this operation was successful

Initializes a newly created plugin instance, passing to it the plugin instance peer which it should use for all communication back to the browser.

Parameters:
peer- the corresponding plugin instance peer
Returns:
- NS_OK if this operation was successful

Initializes a newly created plugin instance, passing to it the plugin instance peer which it should use for all communication back to the browser.

Parameters:
peer- the corresponding plugin instance peer
Returns:
- NS_OK if this operation was successful

Definition at line 656 of file MRJPlugin.cpp.

{
    // Tell the peer we are retaining a reference.
    mPeer = peer;
    mPeer->AddRef();

    // See if we have a windowless peer.
    nsresult result = mPeer->QueryInterface(kIWindowlessPluginInstancePeerIID, (void **)&mWindowlessPeer);
    if (result != NS_OK) mWindowlessPeer = NULL;

    // create a context for the applet we will run.
    mContext = new MRJContext(mSession, this);
    if (!mContext)
        return NS_ERROR_OUT_OF_MEMORY;

    if (hasTagInfo(mPeer)) {
        mContext->processAppletTag();
        mContext->createContext();
    } else {
        // we'll be using JavaScript to create windows.
        // fire up a JavaScript URL to get the current document's location.
        nsIPluginInstance* pluginInstance = this;
        nsIPluginStreamListener* listener = this;
        result = thePluginManager->GetURL(pluginInstance, kGetDocumentBaseScriptURL, NULL, listener);
    }

    return NS_OK;
}

Here is the call graph for this function:

void MRJPluginInstance::inspectInstance ( Boolean  isUpdateEvt) [private]
void MRJPluginInstance::inspectInstance ( Boolean  isUpdateEvt) [private]

Definition at line 926 of file MRJPlugin.cpp.

{
    if (mContext != NULL && mContext->inspectWindow() && !isUpdateEvt && mWindowlessPeer != NULL)
        mWindowlessPeer->ForceRedraw();
}

Here is the call graph for this function:

Here is the caller graph for this function:

Called to tell the plugin that the initial src/data stream is ready.

Expects the plugin to return a nsIPluginStreamListener.

(Corresponds to NPP_NewStream.)

Parameters:
aListener- listener the browser will use to give the plugin the data
Returns:
- NS_OK if this operation was successful

Called to tell the plugin that the initial src/data stream is ready.

Expects the plugin to return a nsIPluginStreamListener.

(Corresponds to NPP_NewStream.)

Parameters:
listener- listener the browser will use to give the plugin the data
Returns:
- NS_OK if this operation was successful

Definition at line 354 of file MRJPlugin.h.

    {
        *listener = this;
        AddRef();
        return NS_OK;
    }

Here is the call graph for this function:

Called to tell the plugin that the initial src/data stream is ready.

Expects the plugin to return a nsIPluginStreamListener.

(Corresponds to NPP_NewStream.)

Parameters:
listener- listener the browser will use to give the plugin the data
Returns:
- NS_OK if this operation was successful

Definition at line 361 of file MRJPlugin.h.

       {
              *listener = this;
              AddRef();
              return NS_OK;
       }

Here is the call graph for this function:

void nsIPluginStreamListener::onDataAvailable ( in nsIPluginStreamInfo  aPluginInfo,
in nsIInputStream  aInputStream,
in unsigned long  aLength 
) [inherited]

Notify the client that data is available in the input stream.

This method is called whenver data is written into the input stream by the networking library...

Parameters:
aPluginInfo- plugin stream info
aInputStream- the input stream containing the data. This stream can be either a blocking or non-blocking stream.
aLength- the amount of data that was just pushed into the stream.
Returns:
- the return value is currently ignored.

Notify the client that data is available in the input stream.

This method is called whenver data is written into the input stream by the networking library...

Parameters:
aIStreamThe input stream containing the data. This stream can be either a blocking or non-blocking stream.
lengthThe amount of data that was just pushed into the stream.
Returns:
The return value is currently ignored.

Notify the client that data is available in the input stream.

This method is called whenver data is written into the input stream by the networking library...

Parameters:
aIStreamThe input stream containing the data. This stream can be either a blocking or non-blocking stream.
lengthThe amount of data that was just pushed into the stream.
Returns:
The return value is currently ignored.

Definition at line 685 of file MRJPlugin.cpp.

{
       // hopefully all our data is available.
       char* documentBase = new char[length + 1];
       if (documentBase != NULL) {
              if (input->Read(documentBase, length, &length) == NS_OK) {
                     // We've delayed processing the applet tag, because we
                     // don't know the location of the current document yet.
                     documentBase[length] = '\0';
                     
                     // set up the default document location, which can be used to compute relative CODEBASE, etc.
                     mContext->setDocumentBase(documentBase);
                     delete[] documentBase;
                     
                     mContext->processAppletTag();
                     mContext->createContext();
                     
                     // SetWindow may be called at an inopportune time.
                     if (mPluginWindow != NULL)
                            mContext->setWindow(mPluginWindow);
              }
       }
       return NS_OK;
}

Here is the call graph for this function:

void nsIPluginStreamListener::onFileAvailable ( in nsIPluginStreamInfo  aPluginInfo,
in string  aFileName 
) [inherited]

Notify the client that data is available in the file.

Parameters:
aPluginInfo- plugin stream info
aFileName- the name of the file containing the data
Returns:
- the return value is currently ignored.
NS_IMETHOD MRJPluginInstance::OnFileAvailable ( nsIPluginStreamInfo pluginInfo,
const char *  fileName 
) [inline]

Definition at line 425 of file MRJPlugin.h.

NS_IMETHOD MRJPluginInstance::OnFileAvailable ( nsIPluginStreamInfo pluginInfo,
const char *  fileName 
) [inline]

Definition at line 432 of file MRJPlugin.h.

Notify the observer that the URL has started to load.

This method is called only once, at the beginning of a URL load.

Parameters:
aPluginInfo- plugin stream info
Returns:
- the return value is currently ignored, in the future it may be used to cancel the URL load..

Notify the observer that the URL has started to load.

This method is called only once, at the beginning of a URL load.

Returns:
The return value is currently ignored. In the future it may be used to cancel the URL load..

Definition at line 406 of file MRJPlugin.h.

    {
        return NS_OK;
    }

Notify the observer that the URL has started to load.

This method is called only once, at the beginning of a URL load.

Returns:
The return value is currently ignored. In the future it may be used to cancel the URL load..

Definition at line 413 of file MRJPlugin.h.

    {
       return NS_OK;
    }
void nsIPluginStreamListener::onStopBinding ( in nsIPluginStreamInfo  aPluginInfo,
in nsresult  aStatus 
) [inherited]

Notify the observer that the URL has finished loading.

This method is called once when the networking library has finished processing the URL transaction initiatied via the nsINetService::Open(...) call.

This method is called regardless of whether the URL loaded successfully.

Parameters:
aPluginInfo- plugin stream info
aStatus- reason why the stream has been terminated
Returns:
- the return value is currently ignored.

Notify the observer that the URL has finished loading.

This method is called once when the networking library has finished processing the URL transaction initiatied via the nsINetService::Open(...) call.

This method is called regardless of whether the URL loaded successfully.

Parameters:
statusStatus code for the URL load.
msgA text string describing the error.
Returns:
The return value is currently ignored.

Definition at line 442 of file MRJPlugin.h.

    {
        return NS_OK;
    }

Notify the observer that the URL has finished loading.

This method is called once when the networking library has finished processing the URL transaction initiatied via the nsINetService::Open(...) call.

This method is called regardless of whether the URL loaded successfully.

Parameters:
statusStatus code for the URL load.
msgA text string describing the error.
Returns:
The return value is currently ignored.

Definition at line 449 of file MRJPlugin.h.

    {
       return NS_OK;
    }

Definition at line 891 of file MRJPlugin.cpp.

{
       MRJPluginInstance** link = &theInstances;
       MRJPluginInstance* instance  = *link;
       while (instance != NULL) {
              if (instance == this) {
                     *link = mNext;
                     mNext = NULL;
                     break;
              }
              link = &instance->mNext;
              instance = *link;
       }
}

Here is the caller graph for this function:

void nsIPluginInstance::print ( in nsPluginPrintPtr  aPlatformPrint) [inherited]

Called to instruct the plugin instance to print itself to a printer.

(Corresponds to NPP_Print.)

Parameters:
aPlatformPrint- platform-specific printing information
Returns:
- NS_OK if this operation was successful

Called to instruct the plugin instance to print itself to a printer.

(Corresponds to NPP_Print.)

Parameters:
platformPrint- platform-specific printing information
Returns:
- NS_OK if this operation was successful

Called to instruct the plugin instance to print itself to a printer.

(Corresponds to NPP_Print.)

Parameters:
platformPrint- platform-specific printing information
Returns:
- NS_OK if this operation was successful

Definition at line 845 of file MRJPlugin.cpp.

{
       if (platformPrint->mode == nsPluginMode_Embedded) {
              mContext->printApplet(&platformPrint->print.embedPrint.window);
              return NS_OK;
       }
       return NS_ERROR_NOT_IMPLEMENTED;
}

Here is the call graph for this function:

Definition at line 885 of file MRJPlugin.cpp.

Here is the caller graph for this function:

NS_IMETHODIMP SupportsMixin::queryInterface ( const nsIID aIID,
void **  aInstancePtr 
) [inherited]

The lowercase implementations of queryInterface, addRef, and release all act locally on the current object, regardless of aggregation.

They are meant to be called by aggregating outer objects.

Definition at line 129 of file SupportsMixin.cpp.

{
       if (aInstancePtr == NULL) {
              return NS_ERROR_NULL_POINTER;
       }
       // first check to see if it's one of our known interfaces.
       // need to solve the non-left inheritance graph case.
       const InterfaceInfo* interfaces = mInterfaces;
       UInt32 count = mInterfaceCount;
       for (UInt32 i = 0; i < count; i++) {
              if (aIID.Equals(interfaces[i].mIID)) {
                     *aInstancePtr = (void*) (UInt32(mInstance) + interfaces[i].mOffset);
                     addRef();
                     return NS_OK;
              }
       }
       // finally, does the interface match nsISupports?
       static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
       if (aIID.Equals(kISupportsIID)) {
              *aInstancePtr = (void*) mInstance;
              addRef();
              return NS_OK;
       }
       return NS_NOINTERFACE;
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult SupportsMixin::queryInterface ( const nsIID aIID,
void **  aInstancePtr 
) [inherited]

Here is the caller graph for this function:

Called when the window containing the plugin instance changes.

(Corresponds to NPP_SetWindow.)

Parameters:
aWindow- the plugin window structure
Returns:
- NS_OK if this operation was successful

Called when the window containing the plugin instance changes.

(Corresponds to NPP_SetWindow.)

Parameters:
window- the plugin window structure
Returns:
- NS_OK if this operation was successful

Called when the window containing the plugin instance changes.

FIXME: Need an intelligent way to track changes to the NPPluginWindow.

(Corresponds to NPP_SetWindow.)

Parameters:
window- the plugin window structure
Returns:
- NS_OK if this operation was successful

Definition at line 772 of file MRJPlugin.cpp.

{
       mPluginWindow = pluginWindow;

       mContext->setWindow(pluginWindow);

       return NS_OK;
}

Here is the call graph for this function:

void nsIPluginInstance::start ( ) [inherited]

Called to instruct the plugin instance to start.

This will be called after the plugin is first created and initialized, and may be called after the plugin is stopped (via the Stop method) if the plugin instance is returned to in the browser window's history.

Returns:
- NS_OK if this operation was successful

Called to instruct the plugin instance to start.

This will be called after the plugin is first created and initialized, and may be called after the plugin is stopped (via the Stop method) if the plugin instance is returned to in the browser window's history.

Returns:
- NS_OK if this operation was successful

Called to instruct the plugin instance to start.

This will be called after the plugin is first created and initialized, and may be called after the plugin is stopped (via the Stop method) if the plugin instance is returned to in the browser window's history.

Returns:
- NS_OK if this operation was successful

Definition at line 717 of file MRJPlugin.cpp.

{
       // Take this moment to show the applet's frames (if any).
       mContext->showFrames();
       
       mContext->resumeApplet();
       
       return NS_OK;
}

Here is the call graph for this function:

void nsIPluginInstance::stop ( ) [inherited]

Called to instruct the plugin instance to stop, thereby suspending its state.

This method will be called whenever the browser window goes on to display another page and the page containing the plugin goes into the window's history list.

Returns:
- NS_OK if this operation was successful

Called to instruct the plugin instance to stop, thereby suspending its state.

This method will be called whenever the browser window goes on to display another page and the page containing the plugin goes into the window's history list.

Returns:
- NS_OK if this operation was successful

Called to instruct the plugin instance to stop, thereby suspending its state.

This method will be called whenever the browser window goes on to display another page and the page containing the plugin goes into the window's history list.

Returns:
- NS_OK if this operation was successful

Definition at line 727 of file MRJPlugin.cpp.

{
       // Take this moment to hide the applet's frames.
       mContext->hideFrames();

       mContext->suspendApplet();

       return NS_OK;
}

Here is the call graph for this function:


Member Data Documentation

static const UInt32 MRJPluginInstance::kInterfaceCount = sizeof(sInterfaces) / sizeof(InterfaceInfo) [static, private]

Definition at line 490 of file MRJPlugin.h.

Definition at line 482 of file MRJPlugin.h.

Definition at line 481 of file MRJPlugin.h.

Definition at line 486 of file MRJPlugin.h.

Definition at line 477 of file MRJPlugin.h.

Definition at line 479 of file MRJPlugin.h.

Definition at line 483 of file MRJPlugin.h.

Definition at line 480 of file MRJPlugin.h.

Definition at line 478 of file MRJPlugin.h.

Returns a reference back to the plugin instance peer.

This method is used whenever the browser needs to obtain the peer back from a plugin instance. The implementation of this method should be sure to increment the reference count on the peer by calling AddRef.

Parameters:
aPeer- the resulting plugin instance peer
Returns:
- NS_OK if this operation was successful

Definition at line 96 of file nsIPluginInstance.idl.

Initial value:
 {
       { NS_IPLUGININSTANCE_IID, INTERFACE_OFFSET(MRJPluginInstance, nsIPluginInstance) },
       { NS_IJVMPLUGININSTANCE_IID, INTERFACE_OFFSET(MRJPluginInstance, nsIJVMPluginInstance) },
       { NS_IEVENTHANDLER_IID, INTERFACE_OFFSET(MRJPluginInstance, nsIEventHandler) },
}

Definition at line 489 of file MRJPlugin.h.

Gets the type of the stream.

Parameters:
aStreamType- the type of the stream

Definition at line 118 of file nsIPluginStreamListener.idl.


The documentation for this class was generated from the following files: