dom/plugins/ipc/PluginSurfaceParent.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dom/plugins/ipc/PluginSurfaceParent.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,39 @@
     1.4 +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 +
     1.9 +#ifndef dom_plugins_PluginSurfaceParent_h
    1.10 +#define dom_plugins_PluginSurfaceParent_h
    1.11 +
    1.12 +#include "mozilla/plugins/PPluginSurfaceParent.h"
    1.13 +#include "nsAutoPtr.h"
    1.14 +#include "mozilla/plugins/PluginMessageUtils.h"
    1.15 +
    1.16 +#ifndef XP_WIN
    1.17 +#error "This header is for Windows only."
    1.18 +#endif
    1.19 +
    1.20 +class gfxASurface;
    1.21 +
    1.22 +namespace mozilla {
    1.23 +namespace plugins {
    1.24 +
    1.25 +class PluginSurfaceParent : public PPluginSurfaceParent
    1.26 +{
    1.27 +public:
    1.28 +  PluginSurfaceParent(const WindowsSharedMemoryHandle& handle,
    1.29 +                      const gfxIntSize& size,
    1.30 +                      const bool transparent);
    1.31 +  ~PluginSurfaceParent();
    1.32 +
    1.33 +  gfxASurface* Surface() { return mSurface; }
    1.34 +
    1.35 +private:
    1.36 +  nsRefPtr<gfxASurface> mSurface;
    1.37 +};
    1.38 +
    1.39 +} // namespace plugins
    1.40 +} // namespace mozilla
    1.41 +
    1.42 +#endif // dom_plugin_PluginSurfaceParent_h

mercurial