File: ppb_proxy_private.h

package info (click to toggle)
chromium 138.0.7204.183-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 6,071,908 kB
  • sloc: cpp: 34,937,088; ansic: 7,176,967; javascript: 4,110,704; python: 1,419,953; asm: 946,768; xml: 739,971; pascal: 187,324; sh: 89,623; perl: 88,663; objc: 79,944; sql: 50,304; cs: 41,786; fortran: 24,137; makefile: 21,806; php: 13,980; tcl: 13,166; yacc: 8,925; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (47 lines) | stat: -rw-r--r-- 1,890 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// Copyright 2011 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef PPAPI_C_PRIVATE_PPB_PROXY_PRIVATE_H_
#define PPAPI_C_PRIVATE_PPB_PROXY_PRIVATE_H_

#include "ppapi/c/pp_bool.h"
#include "ppapi/c/pp_instance.h"
#include "ppapi/c/pp_module.h"
#include "ppapi/c/pp_resource.h"

#define PPB_PROXY_PRIVATE_INTERFACE "PPB_Proxy_Private;6"

// Exposes functions needed by the out-of-process proxy to call into the
// renderer PPAPI implementation.
struct PPB_Proxy_Private {
  // Called when the given plugin process has crashed.
  void (*PluginCrashed)(PP_Module module);

  // Returns the instance for the given resource, or 0 on failure.
  PP_Instance (*GetInstanceForResource)(PP_Resource resource);

  // Sets a callback that will be used to make sure that PP_Instance IDs
  // are unique in the plugin.
  //
  // Since the plugin may be shared between several browser processes, we need
  // to do extra work to make sure that an instance ID is globally unqiue. The
  // given function will be called and will return true if the given
  // PP_Instance is OK to use in the plugin. It will then be marked as "in use"
  // On failure (returns false), the host implementation will generate a new
  // instance ID and try again.
  void (*SetReserveInstanceIDCallback)(
      PP_Module module,
      PP_Bool (*is_seen)(PP_Module, PP_Instance));

  // Allows adding additional refcounts to the PluginModule that owns the
  // proxy dispatcher (and all interface proxies). For every AddRef call
  // there must be a corresponding release call.
  void (*AddRefModule)(PP_Module module);
  void (*ReleaseModule)(PP_Module module);

  // Allows asserts to be written for some bad conditions while cleaning up.
  PP_Bool (*IsInModuleDestructor)(PP_Module module);
};

#endif  // PPAPI_C_PRIVATE_PPB_PROXY_PRIVATE_H_