2012-05-21 04:12:37 -07:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2009-10-29 10:58:31 -07:00
|
|
|
|
|
|
|
#ifndef mozilla_dom_DocumentRendererParent
|
|
|
|
#define mozilla_dom_DocumentRendererParent
|
|
|
|
|
|
|
|
#include "mozilla/ipc/PDocumentRendererParent.h"
|
|
|
|
#include "nsCOMPtr.h"
|
|
|
|
#include "nsString.h"
|
|
|
|
#include "gfxContext.h"
|
|
|
|
|
2012-06-06 00:42:47 -07:00
|
|
|
class nsICanvasRenderingContextInternal;
|
|
|
|
|
2009-10-29 10:58:31 -07:00
|
|
|
namespace mozilla {
|
|
|
|
namespace ipc {
|
|
|
|
|
|
|
|
class DocumentRendererParent : public PDocumentRendererParent
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
DocumentRendererParent();
|
|
|
|
virtual ~DocumentRendererParent();
|
|
|
|
|
|
|
|
void SetCanvasContext(nsICanvasRenderingContextInternal* aCanvas,
|
|
|
|
gfxContext* ctx);
|
2010-10-26 15:20:53 -07:00
|
|
|
void DrawToCanvas(const nsIntSize& renderedSize,
|
2009-10-29 10:58:31 -07:00
|
|
|
const nsCString& aData);
|
|
|
|
|
2010-10-26 15:20:53 -07:00
|
|
|
virtual bool Recv__delete__(const nsIntSize& renderedSize,
|
2009-12-03 00:16:14 -08:00
|
|
|
const nsCString& data);
|
|
|
|
|
2009-10-29 10:58:31 -07:00
|
|
|
private:
|
|
|
|
nsCOMPtr<nsICanvasRenderingContextInternal> mCanvas;
|
|
|
|
nsRefPtr<gfxContext> mCanvasContext;
|
|
|
|
|
|
|
|
DISALLOW_EVIL_CONSTRUCTORS(DocumentRendererParent);
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|