bug 78390 accessible support for full page PDFs
r=aaronl,peterl sr=jst
This commit is contained in:
Родитель
e7df43148f
Коммит
366a074c3c
|
@ -1,57 +0,0 @@
|
|||
#!gmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s): John Gaunt (jgaunt@netscape.com)
|
||||
|
||||
DEPTH=..\..
|
||||
MODULE=accessibility
|
||||
REQUIRES = \
|
||||
xpcom \
|
||||
string \
|
||||
dom \
|
||||
$(NULL)
|
||||
LIBRARY_NAME=accessibility
|
||||
MODULE_NAME=nsAccessibilityModule
|
||||
|
||||
include <$(DEPTH)\config\config.mak>
|
||||
|
||||
CPP_OBJS=\
|
||||
.\$(OBJDIR)\nsAccessibilityFactory.obj \
|
||||
$(NULL)
|
||||
|
||||
LINCS = $(LINCS) -I..\src # for implementation headers
|
||||
|
||||
SUB_LIBRARIES=\
|
||||
$(DIST)\lib\accessibility_base_s.lib \
|
||||
$(DIST)\lib\accessibility_html_s.lib \
|
||||
!ifdef MOZ_XUL
|
||||
$(DIST)\lib\accessibility_xul_s.lib \
|
||||
!endif
|
||||
$(NULL)
|
||||
|
||||
LLIBS=\
|
||||
$(DIST)\lib\xpcom.lib \
|
||||
$(DIST)\lib\gkgfx.lib \
|
||||
$(DIST)\lib\contentshared_s.lib \
|
||||
$(DIST)\lib\raptorwidget_s.lib \
|
||||
$(LIBNSPR) \
|
||||
$(NULL)
|
||||
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -28,26 +28,28 @@ include $(DEPTH)/config/autoconf.mk
|
|||
|
||||
MODULE = accessibility
|
||||
LIBRARY_NAME = accessibility_html_s
|
||||
REQUIRES = content \
|
||||
docshell \
|
||||
dom \
|
||||
editor \
|
||||
gfx \
|
||||
gfx2 \
|
||||
htmlparser \
|
||||
imglib2 \
|
||||
intl \
|
||||
layout \
|
||||
locale \
|
||||
necko \
|
||||
plugin \
|
||||
string \
|
||||
uriloader \
|
||||
view \
|
||||
webshell \
|
||||
widget \
|
||||
xpcom \
|
||||
$(NULL)
|
||||
REQUIRES = \
|
||||
appshell \
|
||||
content \
|
||||
docshell \
|
||||
dom \
|
||||
editor \
|
||||
gfx \
|
||||
gfx2 \
|
||||
htmlparser \
|
||||
imglib2 \
|
||||
intl \
|
||||
layout \
|
||||
locale \
|
||||
necko \
|
||||
plugin \
|
||||
string \
|
||||
uriloader \
|
||||
view \
|
||||
webshell \
|
||||
widget \
|
||||
xpcom \
|
||||
$(NULL)
|
||||
|
||||
CPPSRCS = \
|
||||
nsHTMLAreaAccessible.cpp \
|
||||
|
|
|
@ -1,82 +0,0 @@
|
|||
#!gmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s): John Gaunt (jgaunt@netscape.com)
|
||||
|
||||
DEPTH = ..\..\..
|
||||
MODULE = accessibility
|
||||
LIBRARY_NAME = accessibility_html_s
|
||||
REQUIRES = \
|
||||
content \
|
||||
docshell \
|
||||
dom \
|
||||
editor \
|
||||
gfx \
|
||||
gfx2 \
|
||||
htmlparser \
|
||||
imglib2 \
|
||||
intl \
|
||||
layout \
|
||||
locale \
|
||||
necko \
|
||||
plugin \
|
||||
string \
|
||||
uriloader \
|
||||
view \
|
||||
webshell \
|
||||
widget \
|
||||
xpcom \
|
||||
$(NULL)
|
||||
|
||||
CPP_OBJS = \
|
||||
.\$(OBJDIR)\nsHTMLAreaAccessible.obj \
|
||||
.\$(OBJDIR)\nsHTMLFormControlAccessible.obj \
|
||||
.\$(OBJDIR)\nsHTMLIFrameRootAccessible.obj \
|
||||
.\$(OBJDIR)\nsHTMLImageAccessible.obj \
|
||||
.\$(OBJDIR)\nsHTMLLinkAccessible.obj \
|
||||
.\$(OBJDIR)\nsHTMLPluginAccessible.obj \
|
||||
.\$(OBJDIR)\nsHTMLSelectAccessible.obj \
|
||||
.\$(OBJDIR)\nsHTMLTableAccessible.obj \
|
||||
.\$(OBJDIR)\nsHTMLTextAccessible.obj \
|
||||
.\$(OBJDIR)\nsHTMLWin32ObjectAccessible.obj \
|
||||
$(NULL)
|
||||
|
||||
EXPORTS = \
|
||||
.\nsHTMLWin32ObjectAccessible.h \
|
||||
$(NULL)
|
||||
|
||||
LINCS = \
|
||||
-I..\base \
|
||||
-I..\..\..\layout\html\forms\public \
|
||||
-I..\..\..\layout\html\forms\src \
|
||||
-I..\..\..\layout\html\base\src \
|
||||
$(NULL)
|
||||
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
||||
libs:: $(LIBRARY)
|
||||
$(MAKE_INSTALL) $(LIBRARY) $(DIST)\lib
|
||||
|
||||
clobber::
|
||||
rm -f $(DIST)\lib\$(LIBRARY_NAME).lib
|
||||
|
||||
|
||||
|
||||
|
|
@ -39,6 +39,12 @@
|
|||
|
||||
#include "nsAccessible.h"
|
||||
|
||||
/**
|
||||
* This class is used to wrap the window for the plugin. It's only child
|
||||
* is a shim class that will allow the platform specific layer of our
|
||||
* accessibility support to get the IAccessible from the plugin itself
|
||||
* (via the windows call to get he accessible by window).
|
||||
*/
|
||||
class nsHTMLPluginAccessible : public nsAccessible
|
||||
{
|
||||
public:
|
||||
|
|
|
@ -28,21 +28,26 @@ include $(DEPTH)/config/autoconf.mk
|
|||
|
||||
MODULE = accessibility
|
||||
LIBRARY_NAME = accessibility_xul_s
|
||||
REQUIRES = content \
|
||||
docshell \
|
||||
dom \
|
||||
gfx \
|
||||
htmlparser \
|
||||
intl \
|
||||
layout \
|
||||
locale \
|
||||
necko \
|
||||
pref \
|
||||
string \
|
||||
view \
|
||||
widget \
|
||||
xpcom \
|
||||
$(NULL)
|
||||
REQUIRES = \
|
||||
appshell \
|
||||
content \
|
||||
docshell \
|
||||
dom \
|
||||
gfx \
|
||||
htmlparser \
|
||||
intl \
|
||||
layout \
|
||||
locale \
|
||||
necko \
|
||||
plugin \
|
||||
pref \
|
||||
string \
|
||||
view \
|
||||
webbrwsr \
|
||||
webshell \
|
||||
widget \
|
||||
xpcom \
|
||||
$(NULL)
|
||||
|
||||
CPPSRCS = \
|
||||
nsXULColorPickerAccessible.cpp \
|
||||
|
@ -62,4 +67,7 @@ include $(topsrcdir)/config/rules.mk
|
|||
LOCAL_INCLUDES = \
|
||||
-I$(srcdir)/../base \
|
||||
-I$(srcdir)/../html \
|
||||
-I$(srcdir)/../../../layout/html/base/src \
|
||||
-I$(srcdir)/../../../layout/html/forms/src \
|
||||
-I$(srcdir)/../../../layout/html/forms/public \
|
||||
$(NULL)
|
||||
|
|
|
@ -1,70 +0,0 @@
|
|||
#!gmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s): John Gaunt (jgaunt@netscape.com)
|
||||
|
||||
DEPTH = ..\..\..
|
||||
MODULE = accessibility
|
||||
LIBRARY_NAME = accessibility_xul_s
|
||||
REQUIRES = \
|
||||
content \
|
||||
docshell \
|
||||
dom \
|
||||
gfx \
|
||||
intl \
|
||||
layout \
|
||||
layout_xul \
|
||||
locale \
|
||||
necko \
|
||||
plugin \
|
||||
pref \
|
||||
string \
|
||||
widget \
|
||||
xpcom \
|
||||
$(NULL)
|
||||
|
||||
CPP_OBJS = \
|
||||
.\$(OBJDIR)\nsXULColorPickerAccessible.obj \
|
||||
.\$(OBJDIR)\nsXULFormControlAccessible.obj \
|
||||
.\$(OBJDIR)\nsXULMenuAccessible.obj \
|
||||
.\$(OBJDIR)\nsXULSelectAccessible.obj \
|
||||
.\$(OBJDIR)\nsXULTabAccessible.obj \
|
||||
.\$(OBJDIR)\nsXULTextAccessible.obj \
|
||||
.\$(OBJDIR)\nsXULTreeAccessible.obj \
|
||||
$(NULL)
|
||||
|
||||
EXPORTS = \
|
||||
$(NULL)
|
||||
|
||||
LINCS = \
|
||||
-I..\base \
|
||||
-I..\html \
|
||||
$(NULL)
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
||||
libs:: $(LIBRARY)
|
||||
$(MAKE_INSTALL) $(LIBRARY) $(DIST)\lib
|
||||
|
||||
clobber::
|
||||
rm -f $(DIST)\lib\$(LIBRARY_NAME).lib
|
||||
|
||||
|
||||
|
||||
|
|
@ -38,11 +38,22 @@
|
|||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
// NOTE: alphabetically ordered
|
||||
#include "nsAccessibilityService.h"
|
||||
#include "nsXULTabAccessible.h"
|
||||
#include "nsIContentViewer.h"
|
||||
#include "nsIDocShell.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
#include "nsIDOMXULSelectCntrlEl.h"
|
||||
#include "nsIDOMXULSelectCntrlItemEl.h"
|
||||
#include "nsIFrame.h"
|
||||
#include "nsIPluginViewer.h"
|
||||
#include "nsIScriptGlobalObject.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIWebShell.h"
|
||||
#include "nsIWebShellWindow.h"
|
||||
#include "nsplugindefs.h"
|
||||
#include "nsPluginViewer.h"
|
||||
|
||||
/**
|
||||
* XUL Tab
|
||||
|
@ -179,7 +190,7 @@ NS_IMETHODIMP nsXULTabBoxAccessible::GetAccChildCount(PRInt32 *_retval)
|
|||
|
||||
/** Constructor */
|
||||
nsXULTabPanelsAccessible::nsXULTabPanelsAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell):
|
||||
nsAccessible(aNode, aShell)
|
||||
nsAccessible(aNode, aShell), mAccService(do_GetService("@mozilla.org/accessibilityService;1"))
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -211,6 +222,87 @@ NS_IMETHODIMP nsXULTabPanelsAccessible::GetAccName(nsAString& _retval)
|
|||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsXULTabPanelsAccessible::GetAccFirstChild(nsIAccessible **_retval)
|
||||
{
|
||||
nsAccessible::GetAccFirstChild(_retval);
|
||||
if (*_retval == nsnull)
|
||||
GetAccPluginChild(_retval);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsXULTabPanelsAccessible::GetAccLastChild(nsIAccessible **_retval)
|
||||
{
|
||||
nsAccessible::GetAccLastChild(_retval);
|
||||
if (*_retval == nsnull)
|
||||
GetAccPluginChild(_retval);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP nsXULTabPanelsAccessible::GetAccChildCount(PRInt32 *_retval)
|
||||
{
|
||||
nsAccessible::GetAccChildCount(_retval);
|
||||
if (*_retval == 0) {
|
||||
*_retval = 1;
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult nsXULTabPanelsAccessible::GetAccPluginChild(nsIAccessible **_retval)
|
||||
{
|
||||
// this big mess eventually gets the HWND for the full
|
||||
// page plugin, and creates the shim class so we can
|
||||
// get the IAccessible from the system in the widget/src code
|
||||
nsCOMPtr<nsIDOMDocument> domDoc;
|
||||
mDOMNode->GetOwnerDocument(getter_AddRefs(domDoc));
|
||||
nsCOMPtr<nsIDocument> doc(do_QueryInterface(domDoc));
|
||||
if (doc) {
|
||||
nsCOMPtr<nsIScriptGlobalObject> globalObj;
|
||||
doc->GetScriptGlobalObject(getter_AddRefs(globalObj));
|
||||
if (globalObj) {
|
||||
nsCOMPtr<nsIDocShell> docShell;
|
||||
globalObj->GetDocShell(getter_AddRefs(docShell));
|
||||
nsCOMPtr<nsIWebShell> webShell(do_QueryInterface(docShell));
|
||||
if (webShell) {
|
||||
nsCOMPtr<nsIWebShellContainer> container;
|
||||
webShell->GetContainer(*getter_AddRefs(container));
|
||||
nsCOMPtr<nsIWebShellWindow> wsWin(do_QueryInterface(container));
|
||||
if (wsWin) {
|
||||
nsCOMPtr<nsIWebShell> contentShell;
|
||||
wsWin->GetContentWebShell(getter_AddRefs(contentShell));
|
||||
nsCOMPtr<nsIDocShell> contentDocShell(do_QueryInterface(contentShell));
|
||||
if (contentDocShell) {
|
||||
nsCOMPtr<nsIContentViewer> contentViewer;
|
||||
contentDocShell->GetContentViewer(getter_AddRefs(contentViewer));
|
||||
nsCOMPtr<nsIPluginViewer> pluginViewer (do_QueryInterface(contentViewer));
|
||||
if (pluginViewer) {
|
||||
nsIPluginViewer *pViewer = pluginViewer.get();
|
||||
PluginViewerImpl *viewer = (PluginViewerImpl*)pViewer;
|
||||
#ifdef XP_WIN
|
||||
// Plugin code tends to be very platform specific, need to rev this
|
||||
// when linux/mac plugins come into the picture HWND == windows
|
||||
HWND pluginPort = nsnull;
|
||||
viewer->GetPluginPort(&pluginPort);
|
||||
if (pluginPort != 0) {
|
||||
if (mAccService) {
|
||||
mAccService->CreateHTMLNativeWindowAccessible(mDOMNode, mPresShell, (PRInt32)pluginPort, _retval);
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
#else
|
||||
*_retval = nsnull;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
/**
|
||||
* XUL Tabs - the s really stands for strip. this is a collection of tab objects
|
||||
*/
|
||||
|
|
|
@ -80,12 +80,20 @@ class nsXULTabPanelsAccessible : public nsAccessible
|
|||
{
|
||||
public:
|
||||
nsXULTabPanelsAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
|
||||
NS_IMETHOD GetAccChildCount(PRInt32 *_retval);
|
||||
NS_IMETHOD GetAccFirstChild(nsIAccessible **_retval);
|
||||
NS_IMETHOD GetAccLastChild(nsIAccessible **_retval);
|
||||
NS_IMETHOD GetAccRole(PRUint32 *_retval);
|
||||
NS_IMETHOD GetAccName(nsAString& _retval);
|
||||
NS_IMETHOD GetAccState(PRUint32 *_retval);
|
||||
|
||||
protected:
|
||||
nsresult GetAccPluginChild(nsIAccessible **_retval);
|
||||
|
||||
// data members
|
||||
nsCOMPtr<nsIDOMNode> mGParentDOMNode;
|
||||
nsCOMPtr<nsIDOMNode> mParentDOMNode;
|
||||
nsCOMPtr<nsIAccessibilityService> mAccService;
|
||||
};
|
||||
|
||||
/** merely a container of tab obejcts */
|
||||
|
|
|
@ -88,6 +88,7 @@ EXPORTS = \
|
|||
nsPluginsCID.h \
|
||||
nsIPluginHost.h \
|
||||
nsIPluginInstanceOwner.h \
|
||||
nsPluginViewer.h \
|
||||
$(NULL)
|
||||
|
||||
ifeq ($(OS_ARCH),WINNT)
|
||||
|
|
|
@ -22,9 +22,11 @@
|
|||
DEPTH=..\..\..\..
|
||||
|
||||
EXPORTS = \
|
||||
nsPluginsCID.h \
|
||||
nsIPluginHost.h \
|
||||
nsIPluginInstanceOwner.h
|
||||
nsIPluginHost.h \
|
||||
nsIPluginInstanceOwner.h \
|
||||
nsPluginsCID.h \
|
||||
nsPluginViewer.h \
|
||||
$(NULL)
|
||||
|
||||
MODULE = plugin
|
||||
LIBRARY_NAME = gkplugin
|
||||
|
|
|
@ -155,9 +155,10 @@ public:
|
|||
NS_IMETHOD_(void) Notify(nsITimer *timer);
|
||||
void CancelTimer();
|
||||
|
||||
nsPluginPort* GetPluginPort();
|
||||
|
||||
#ifdef XP_MAC
|
||||
void GUItoMacEvent(const nsGUIEvent& anEvent, EventRecord& aMacEvent);
|
||||
nsPluginPort* GetPluginPort();
|
||||
void FixUpPluginWindow();
|
||||
#endif
|
||||
|
||||
|
@ -175,55 +176,6 @@ private:
|
|||
nsRect& aClipRect, PRBool& aIsVisible);
|
||||
#endif
|
||||
|
||||
class PluginViewerImpl : public nsIPluginViewer,
|
||||
public nsIContentViewer,
|
||||
public nsIContentViewerEdit,
|
||||
public nsIWebBrowserPrint
|
||||
{
|
||||
public:
|
||||
PluginViewerImpl(const char* aCommand);
|
||||
nsresult Init(nsIStreamListener** aDocListener);
|
||||
|
||||
NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
|
||||
|
||||
// nsISupports
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
// nsIPluginViewer
|
||||
NS_IMETHOD StartLoad(nsIRequest* request, nsIStreamListener*& aResult);
|
||||
|
||||
// nsIContentViewer
|
||||
NS_DECL_NSICONTENTVIEWER
|
||||
|
||||
// nsIContentViewerEdit
|
||||
NS_DECL_NSICONTENTVIEWEREDIT
|
||||
|
||||
// nsIWebBrowserPrint
|
||||
NS_DECL_NSIWEBBROWSERPRINT
|
||||
|
||||
virtual ~PluginViewerImpl();
|
||||
|
||||
nsresult CreatePlugin(nsIRequest* request, nsIPluginHost* aHost, const nsRect& aBounds,
|
||||
nsIStreamListener*& aResult);
|
||||
|
||||
nsresult MakeWindow(nsNativeWidget aParent,
|
||||
nsIDeviceContext* aDeviceContext,
|
||||
const nsRect& aBounds);
|
||||
|
||||
void ForceRefresh(void);
|
||||
|
||||
nsresult GetURI(nsIURI* *aURI);
|
||||
|
||||
nsresult GetDocument(nsIDocument* *aDocument);
|
||||
|
||||
nsIWidget* mWindow;
|
||||
nsIDocument* mDocument;
|
||||
nsCOMPtr<nsISupports> mContainer;
|
||||
nsIChannel* mChannel;
|
||||
pluginInstanceOwner *mOwner;
|
||||
PRBool mEnableRendering;
|
||||
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
|
@ -589,6 +541,15 @@ PluginViewerImpl::GetBounds(nsRect& aResult)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
#ifdef XP_WIN
|
||||
NS_IMETHODIMP
|
||||
PluginViewerImpl::GetPluginPort(HWND *aPort)
|
||||
{
|
||||
*aPort = (HWND) mOwner->GetPluginPort();
|
||||
return NS_OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
NS_IMETHODIMP
|
||||
PluginViewerImpl::GetPreviousViewer(nsIContentViewer** aViewer)
|
||||
{
|
||||
|
@ -1396,17 +1357,20 @@ void pluginInstanceOwner::CancelTimer()
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
#ifdef XP_MAC
|
||||
nsPluginPort* pluginInstanceOwner::GetPluginPort()
|
||||
{
|
||||
//!!! Port must be released for windowless plugins on Windows, because it is HDC !!!
|
||||
|
||||
nsPluginPort* result = NULL;
|
||||
if (mWindow != NULL)
|
||||
result = (nsPluginPort*) mWindow->GetNativeData(NS_NATIVE_PLUGIN_PORT);
|
||||
return result;
|
||||
if (mWindow != NULL)
|
||||
{
|
||||
result = (nsPluginPort*) mWindow->GetNativeData(NS_NATIVE_PLUGIN_PORT);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
#ifdef XP_MAC
|
||||
|
||||
// calculate the absolute position and clip for a widget
|
||||
// and use other windows in calculating the clip
|
||||
// also find out if we are visible or not
|
||||
|
|
|
@ -38,8 +38,72 @@
|
|||
#ifndef nsPluginViewer_h__
|
||||
#define nsPluginViewer_h__
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nscore.h"
|
||||
#include "nsCRT.h"
|
||||
#include "nsIContentViewer.h"
|
||||
#include "nsIContentViewerEdit.h"
|
||||
#include "nsIWebBrowserPrint.h"
|
||||
#include "nsIWidget.h"
|
||||
#include "nsIPluginViewer.h"
|
||||
|
||||
class nsIStreamListener;
|
||||
class nsIContentViewer;
|
||||
class pluginInstanceOwner;
|
||||
|
||||
class PluginViewerImpl : public nsIPluginViewer,
|
||||
public nsIContentViewer,
|
||||
public nsIContentViewerEdit,
|
||||
public nsIWebBrowserPrint
|
||||
{
|
||||
public:
|
||||
PluginViewerImpl(const char* aCommand);
|
||||
nsresult Init(nsIStreamListener** aDocListener);
|
||||
|
||||
NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
|
||||
|
||||
// nsISupports
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
// nsIPluginViewer
|
||||
NS_IMETHOD StartLoad(nsIRequest* request, nsIStreamListener*& aResult);
|
||||
|
||||
// nsIContentViewer
|
||||
NS_DECL_NSICONTENTVIEWER
|
||||
|
||||
// nsIContentViewerEdit
|
||||
NS_DECL_NSICONTENTVIEWEREDIT
|
||||
|
||||
// nsIWebBrowserPrint
|
||||
NS_DECL_NSIWEBBROWSERPRINT
|
||||
|
||||
#ifdef XP_WIN
|
||||
NS_IMETHOD GetPluginPort(HWND *aPort);
|
||||
#endif
|
||||
|
||||
virtual ~PluginViewerImpl();
|
||||
|
||||
nsresult CreatePlugin(nsIRequest* request, nsIPluginHost* aHost, const nsRect& aBounds,
|
||||
nsIStreamListener*& aResult);
|
||||
|
||||
nsresult MakeWindow(nsNativeWidget aParent,
|
||||
nsIDeviceContext* aDeviceContext,
|
||||
const nsRect& aBounds);
|
||||
|
||||
void ForceRefresh(void);
|
||||
|
||||
nsresult GetURI(nsIURI* *aURI);
|
||||
|
||||
nsresult GetDocument(nsIDocument* *aDocument);
|
||||
|
||||
nsIWidget* mWindow;
|
||||
nsIDocument* mDocument;
|
||||
nsCOMPtr<nsISupports> mContainer;
|
||||
nsIChannel* mChannel;
|
||||
pluginInstanceOwner *mOwner;
|
||||
PRBool mEnableRendering;
|
||||
|
||||
};
|
||||
|
||||
extern nsresult
|
||||
NS_NewPluginContentViewer(const char* aCommand,
|
||||
|
|
|
@ -60,6 +60,7 @@ public:
|
|||
NS_IMETHOD Toolbar() = 0;
|
||||
NS_IMETHOD Close() = 0;
|
||||
NS_IMETHOD GetWebShell(nsIWebShell *& aWebShell) = 0;
|
||||
NS_IMETHOD GetContentWebShell(nsIWebShell **aResult) = 0;
|
||||
NS_IMETHOD GetWidget(nsIWidget *& aWidget) = 0;
|
||||
NS_IMETHOD GetDOMWindow(nsIDOMWindowInternal** aDOMWindow) = 0;
|
||||
NS_IMETHOD ConvertWebShellToDOMWindow(nsIWebShell* aShell, nsIDOMWindowInternal** aDOMWindow) = 0;
|
||||
|
|
Загрузка…
Ссылка в новой задаче