2012-05-21 15:12:37 +04: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 20:58:31 +03: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 11:42:47 +04:00
|
|
|
class nsICanvasRenderingContextInternal;
|
|
|
|
|
2009-10-29 20:58:31 +03:00
|
|
|
namespace mozilla {
|
|
|
|
namespace ipc {
|
|
|
|
|
|
|
|
class DocumentRendererParent : public PDocumentRendererParent
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
DocumentRendererParent();
|
|
|
|
virtual ~DocumentRendererParent();
|
|
|
|
|
|
|
|
void SetCanvasContext(nsICanvasRenderingContextInternal* aCanvas,
|
|
|
|
gfxContext* ctx);
|
2010-10-27 02:20:53 +04:00
|
|
|
void DrawToCanvas(const nsIntSize& renderedSize,
|
2009-10-29 20:58:31 +03:00
|
|
|
const nsCString& aData);
|
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual void ActorDestroy(ActorDestroyReason aWhy) override;
|
2014-05-02 22:44:13 +04:00
|
|
|
|
2010-10-27 02:20:53 +04:00
|
|
|
virtual bool Recv__delete__(const nsIntSize& renderedSize,
|
2015-03-21 19:28:04 +03:00
|
|
|
const nsCString& data) override;
|
2009-12-03 11:16:14 +03:00
|
|
|
|
2009-10-29 20:58:31 +03:00
|
|
|
private:
|
|
|
|
nsCOMPtr<nsICanvasRenderingContextInternal> mCanvas;
|
|
|
|
nsRefPtr<gfxContext> mCanvasContext;
|
|
|
|
|
|
|
|
DISALLOW_EVIL_CONSTRUCTORS(DocumentRendererParent);
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|