Home | History | Annotate | Download | only in api
      1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 [
      6   {
      7     "namespace": "webview",
      8     "description": "none",
      9     "functions": [
     10       {
     11         "name": "executeScript",
     12         "type": "function",
     13         "description": "Injects JavaScript code into a <webview> page.",
     14         "parameters": [
     15           {
     16             "type": "integer",
     17             "name": "instanceId",
     18             "description": "The instance ID of the guest <webview> process."
     19           },
     20           {
     21             "$ref": "tabs.InjectDetails",
     22             "name": "details",
     23             "description": "Details of the script to run."
     24           },
     25           {
     26             "type": "function",
     27             "name": "callback",
     28             "optional": true,
     29             "description": "Called after all the JavaScript has been executed.",
     30             "parameters": [
     31               {
     32                 "name": "result",
     33                 "optional": true,
     34                 "type": "array",
     35                 "items": {"type": "any", "minimum": 0},
     36                 "description": "The result of the script in every injected frame."
     37               }
     38             ]
     39           }
     40         ]
     41       },
     42       {
     43         "name": "insertCSS",
     44         "type": "function",
     45         "description": "Injects JavaScript code into a <webview> page.",
     46         "parameters": [
     47           {
     48             "type": "integer",
     49             "name": "instanceId",
     50             "description": "The instance ID of the guest <webview> process."
     51           },
     52           {
     53             "$ref": "tabs.InjectDetails",
     54             "name": "details",
     55             "description": "Details of the script to run."
     56           },
     57           {
     58             "type": "function",
     59             "name": "callback",
     60             "optional": true,
     61             "description": "Called after all the JavaScript has been executed.",
     62             "parameters": [
     63               {
     64                 "name": "result",
     65                 "optional": true,
     66                 "type": "array",
     67                 "items": {"type": "any", "minimum": 0},
     68                 "description": "The result of the script in every injected frame."
     69               }
     70             ]
     71           }
     72         ]
     73       },
     74       {
     75         "name": "go",
     76         "type": "function",
     77         "parameters": [
     78           {
     79             "type": "integer",
     80             "name": "instanceId"
     81           },
     82           {
     83             "type": "integer",
     84             "name": "relativeIndex"
     85           }
     86         ]
     87       },
     88       {
     89         "name": "reload",
     90         "type": "function",
     91         "parameters": [
     92           {
     93             "type": "integer",
     94             "name": "instanceId"
     95           }
     96         ]
     97       },
     98       {
     99         "name": "setPermission",
    100         "type": "function",
    101         "parameters": [
    102           {
    103             "type": "integer",
    104             "name": "instanceId"
    105           },
    106           {
    107             "type": "integer",
    108             "name": "requestId"
    109           },
    110           {
    111             "type": "boolean",
    112             "name": "shouldAllow"
    113           },
    114           {
    115             "type": "string",
    116             "name": "userInput"
    117           }
    118         ]
    119       },
    120       {
    121         "name": "stop",
    122         "type": "function",
    123         "parameters": [
    124           {
    125             "type": "integer",
    126             "name": "instanceId"
    127           }
    128         ]
    129       },
    130       {
    131         "name": "terminate",
    132         "type": "function",
    133         "parameters": [
    134           {
    135             "type": "integer",
    136             "name": "instanceId"
    137           }
    138         ]
    139       }
    140     ]
    141   }
    142 ]
    143 
    144