summaryrefslogtreecommitdiffstats
path: root/ipc/mscom/mozglue/ActCtxResource.h
blob: 4e9c16c8e0914e48d0efb19a37724f469afa68d1 (plain)
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
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#ifndef ACT_CTX_RESOURCE_H
#define ACT_CTX_RESOURCE_H

#include <stdint.h>
#include <windows.h>
#include "mozilla/Types.h"

namespace mozilla {
namespace mscom {

struct ActCtxResource {
  uint16_t mId;
  HMODULE mModule;

  /**
   * Set the resource ID used by GetAccessibilityResource. This is so that
   * sandboxed child processes can use a value passed down from the parent.
   */
  static MFBT_API void SetAccessibilityResourceId(uint16_t aResourceId);

  /**
   * Get the resource ID used by GetAccessibilityResource.
   */
  static MFBT_API uint16_t GetAccessibilityResourceId();

  /**
   * @return ActCtxResource of a11y manifest resource to be passed to
   * mscom::ActivationContext
   */
  static MFBT_API ActCtxResource GetAccessibilityResource();
};

}  // namespace mscom
}  // namespace mozilla

#endif