dom/plugins/ipc/PPluginBackgroundDestroyer.ipdl

branch
TOR_BUG_9701
changeset 15
b8a032363ba2
equal deleted inserted replaced
-1:000000000000 0:1c69f6dee073
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2 * vim: sw=4 ts=8 et :
3 */
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/. */
7
8 include protocol PPluginInstance;
9
10 namespace mozilla {
11 namespace plugins {
12
13 /**
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.
22 */
23 protocol PPluginBackgroundDestroyer {
24 manager PPluginInstance;
25
26 // The ctor message for this protocol serves double-duty as
27 // notification that that the background is stale.
28
29 parent:
30 __delete__();
31
32 state DESTROYING:
33 recv __delete__;
34 };
35
36 } // namespace plugins
37 } // namespace mozilla

mercurial