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
|
|
|
|
2016-11-15 06:26:00 +03:00
|
|
|
virtual mozilla::ipc::IPCResult Recv__delete__(const nsIntSize& renderedSize,
|
|
|
|
const nsCString& data) override;
|
2009-12-03 11:16:14 +03:00
|
|
|
|
2009-10-29 20:58:31 +03:00
|
|
|
private:
|
|
|
|
nsCOMPtr<nsICanvasRenderingContextInternal> mCanvas;
|
2015-10-18 08:24:48 +03:00
|
|
|
RefPtr<gfxContext> mCanvasContext;
|
2009-10-29 20:58:31 +03:00
|
|
|
|
|
|
|
DISALLOW_EVIL_CONSTRUCTORS(DocumentRendererParent);
|
|
|
|
};
|
|
|
|
|
2015-07-13 18:25:42 +03:00
|
|
|
} // namespace ipc
|
|
|
|
} // namespace mozilla
|
2009-10-29 20:58:31 +03:00
|
|
|
|
|
|
|
#endif
|