dom/plugins/ipc/PPluginBackgroundDestroyer.ipdl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dom/plugins/ipc/PPluginBackgroundDestroyer.ipdl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,37 @@
     1.4 +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
     1.5 + * vim: sw=4 ts=8 et :
     1.6 + */
     1.7 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.8 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.9 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
    1.10 +
    1.11 +include protocol PPluginInstance;
    1.12 +
    1.13 +namespace mozilla {
    1.14 +namespace plugins {
    1.15 +
    1.16 +/**
    1.17 + * This protocol exists to allow us to correctly destroy background
    1.18 + * surfaces.  The browser owns the surfaces, but shares a "reference"
    1.19 + * with the plugin.  The browser needs to notify the plugin when the
    1.20 + * background is going to be destroyed, but it can't rely on the
    1.21 + * plugin to destroy it because the plugin may crash at any time.  So
    1.22 + * the plugin instance relinquishes destruction of the its old
    1.23 + * background to actors of this protocol, which can deal with crashy
    1.24 + * corner cases more easily than the instance.
    1.25 + */
    1.26 +protocol PPluginBackgroundDestroyer {
    1.27 +    manager PPluginInstance;
    1.28 +
    1.29 +    // The ctor message for this protocol serves double-duty as
    1.30 +    // notification that that the background is stale.
    1.31 +
    1.32 +parent:
    1.33 +    __delete__();
    1.34 +
    1.35 +state DESTROYING:
    1.36 +    recv __delete__;
    1.37 +};
    1.38 +
    1.39 +}  // namespace plugins
    1.40 +}  // namespace mozilla

mercurial