1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
4 /* This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
8 include protocol PPluginInstance;
14 * This protocol exists to allow us to correctly destroy background
15 * surfaces. The browser owns the surfaces, but shares a "reference"
16 * with the plugin. The browser needs to notify the plugin when the
17 * background is going to be destroyed, but it can't rely on the
18 * plugin to destroy it because the plugin may crash at any time. So
19 * the plugin instance relinquishes destruction of the its old
20 * background to actors of this protocol, which can deal with crashy
21 * corner cases more easily than the instance.
23 protocol PPluginBackgroundDestroyer {
24 manager PPluginInstance;
26 // The ctor message for this protocol serves double-duty as
27 // notification that that the background is stale.
36 } // namespace plugins
37 } // namespace mozilla