1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* ***** BEGIN LICENSE BLOCK *****
3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 * The contents of this file are subject to the Mozilla Public License Version
6 * 1.1 (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 * http://www.mozilla.org/MPL/
10 * Software distributed under the License is distributed on an "AS IS" basis,
11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 * for the specific language governing rights and limitations under the
15 * The Original Code is mozilla.org code.
17 * The Initial Developer of the Original Code is
18 * Netscape Communications Corporation.
19 * Portions created by the Initial Developer are Copyright (C) 1998
20 * the Initial Developer. All Rights Reserved.
24 * Alternatively, the contents of this file may be used under the terms of
25 * either of the GNU General Public License Version 2 or later (the "GPL"),
26 * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
27 * in which case the provisions of the GPL or the LGPL are applicable instead
28 * of those above. If you wish to allow use of your version of this file only
29 * under the terms of either the GPL or the LGPL, and not to allow others to
30 * use your version of this file under the terms of the MPL, indicate your
31 * decision by deleting the provisions above and replace them with the notice
32 * and other provisions required by the GPL or the LGPL. If you do not delete
33 * the provisions above, a recipient may use your version of this file under
34 * the terms of any one of the MPL, the GPL or the LGPL.
36 * ***** END LICENSE BLOCK ***** */
39 * interface for rendering objects for replaced elements implemented by
43 #ifndef nsIObjectFrame_h___
44 #define nsIObjectFrame_h___
48 class nsIPluginInstance
;
50 // {3e2df1fe-a898-4e2e-8763-4ca904fa338e}
51 #define NS_IOBJECTFRAME_IID \
52 { 0x3e2df1fe, 0xa898, 0x4e2e, { 0x87, 0x63, 0x4c, 0xa9, 0x4, 0xfa, 0x33, 0x8e } }
54 class nsIObjectFrame
: public nsISupports
{
56 NS_DECLARE_STATIC_IID_ACCESSOR(NS_IOBJECTFRAME_IID
)
58 NS_IMETHOD
GetPluginInstance(nsIPluginInstance
*& aPluginInstance
) = 0;
61 * Instantiate a plugin for a channel, returning a stream listener for the
64 * @note Calling this method can delete the frame, so don't assume
65 * the frame is alive after this call returns.
67 virtual nsresult
Instantiate(nsIChannel
* aChannel
, nsIStreamListener
** aStreamListener
) = 0;
70 * @note Calling this method can delete the frame, so don't assume
71 * the frame is alive after this call returns.
73 virtual void TryNotifyContentObjectWrapper() = 0;
76 * Instantiate a plugin that loads the data itself.
77 * @param aMimeType Type of the plugin to instantiate. May be null.
78 * @param aURI URI of the plugin data. May be null.
79 * @note Only one of aURI and aMimeType may be null.
80 * If aURI is null, aMimeType must not be the empty string.
81 * @note XXX this method is here only temporarily, until plugins are loaded
84 * @note Calling this method can delete the frame, so don't assume
85 * the frame is alive after this call returns.
87 virtual nsresult
Instantiate(const char* aMimeType
, nsIURI
* aURI
) = 0;
90 * Stops and unloads the plugin. Makes the frame ready to receive another
91 * Instantiate() call. It is safe to call this method even when no plugin
92 * is currently active in this frame.
94 virtual void StopPlugin() = 0;
97 NS_DEFINE_STATIC_IID_ACCESSOR(nsIObjectFrame
, NS_IOBJECTFRAME_IID
)
99 #endif /* nsIObjectFrame_h___ */