summaryrefslogtreecommitdiffstats
path: root/remoting/webapp/manifest.json.jinja2
blob: ed3907ce4775e81a9f09166320ef9ff4b56ce196 (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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
{
  {{ MANIFEST_KEY_FOR_UNOFFICIAL_BUILD }}
  "name": "__MSG_PRODUCT_NAME__",
  "version": "{{ FULL_APP_VERSION }}",
  "description": "__MSG_PRODUCT_DESCRIPTION__",
  "manifest_version": 2,
  "default_locale": "en",
  "minimum_chrome_version": "32",
  "app": {
{% if webapp_type == 'v1' %}
    "launch": {
      "local_path": "main.html"
    }
{% else %}
    "background": {
      "scripts": ["background.js"]
     }
{% endif %}
  },
  "icons": {
    "128": "chromoting128.webp",
    "48": "chromoting48.webp",
    "16": "chromoting16.webp"
  },
{% if webapp_type == 'v1' %}
  "content_scripts": [
    {
      "matches": [
        "{{ OAUTH2_REDIRECT_URL }}"
      ],
      "js": [ "cs_oauth2_trampoline.js" ]
    },
    {
      "matches": [
        "{{ THIRD_PARTY_AUTH_REDIRECT_URL }}"
      ],
      "js": [ "cs_third_party_auth_trampoline.js" ]
    }
  ],
  "content_security_policy": "default-src 'self'; script-src 'self' {{ TALK_GADGET_HOST }}; style-src 'self' https://fonts.googleapis.com; img-src 'self' {{ TALK_GADGET_HOST }}; font-src *; connect-src 'self' {{ OAUTH2_ACCOUNTS_HOST }} {{ GOOGLE_API_HOSTS }} {{ TALK_GADGET_HOST }} https://relay.google.com",
{% endif %}
  "optional_permissions": [
    "<all_urls>"
  ],

{% if webapp_type != 'v1' %}
  "oauth2": {
    "client_id": "{{ REMOTING_IDENTITY_API_CLIENT_ID }}",
    "scopes": [
      "https://www.googleapis.com/auth/chromoting https://www.googleapis.com/auth/googletalk https://www.googleapis.com/auth/userinfo#email"
    ]
  },
  "sandbox": {
    "pages": [ "wcs_sandbox.html" ]
  },
{% endif %}

  "permissions": [
    "{{ OAUTH2_ACCOUNTS_HOST }}/*",
    "{{ OAUTH2_API_BASE_URL }}/*",
    "{{ DIRECTORY_API_BASE_URL }}/*",
    "{{ TALK_GADGET_HOST }}/talkgadget/*",
    "https://relay.google.com/*",
    "storage",
    "clipboardRead",
    "clipboardWrite",
    "nativeMessaging"
{% if webapp_type != 'v1' %}
    ,
    "fullscreen",
    "identity",
    "contextMenus",
    "overrideEscFullscreen"
{% endif %}
{% if webapp_type == 'v2_pnacl' %}
    ,{
      "socket": [
        "tcp-connect",
        "tcp-listen",
        "udp-send-to",
        "udp-bind",
        "udp-multicast-membership",
        "resolve-host",
        "network-state"
      ]
    }
{% endif %}
  ]
}