content/canvas/public/DocumentRendererParent.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/content/canvas/public/DocumentRendererParent.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,42 @@
     1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.7 +
     1.8 +#ifndef mozilla_dom_DocumentRendererParent
     1.9 +#define mozilla_dom_DocumentRendererParent
    1.10 +
    1.11 +#include "mozilla/ipc/PDocumentRendererParent.h"
    1.12 +#include "nsCOMPtr.h"
    1.13 +#include "nsString.h"
    1.14 +#include "gfxContext.h"
    1.15 +
    1.16 +class nsICanvasRenderingContextInternal;
    1.17 +
    1.18 +namespace mozilla {
    1.19 +namespace ipc {
    1.20 +
    1.21 +class DocumentRendererParent : public PDocumentRendererParent
    1.22 +{
    1.23 +public:
    1.24 +    DocumentRendererParent();
    1.25 +    virtual ~DocumentRendererParent();
    1.26 +
    1.27 +    void SetCanvasContext(nsICanvasRenderingContextInternal* aCanvas,
    1.28 +			  gfxContext* ctx);
    1.29 +    void DrawToCanvas(const nsIntSize& renderedSize,
    1.30 +		      const nsCString& aData);
    1.31 +
    1.32 +    virtual bool Recv__delete__(const nsIntSize& renderedSize,
    1.33 +                                const nsCString& data);
    1.34 +
    1.35 +private:
    1.36 +    nsCOMPtr<nsICanvasRenderingContextInternal> mCanvas;
    1.37 +    nsRefPtr<gfxContext> mCanvasContext;
    1.38 +
    1.39 +    DISALLOW_EVIL_CONSTRUCTORS(DocumentRendererParent);
    1.40 +};
    1.41 +
    1.42 +}
    1.43 +}
    1.44 +
    1.45 +#endif

mercurial