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
   90
   91
   92
   93
   94
   95
   96
   97
   98
   99
  100
  101
  102
  103
  104
  105
  106
  107
  108
  109
  110
  111
  112
  113
  114
  115
  116
  117
  118
  119
  120
  121
  122
  123
  124
  125
  126
  127
  128
  129
  130
  131
  132
  133
  134
  135
  136
  137
  138
  139
  140
  141
  142
  143
  144
  145
  146
  147
  148
  149
  150
  151
  152
  153
  154
  155
  156
  157
  158
  159
  160
  161
  162
  163
  164
  165
  166
  167
  168
  169
  170
  171
  172
  173
  174
  175
  176
  177
  178
  179
  180
  181
  182
  183
  184
  185
  186
  187
  188
  189
  190
  191
  192

content / browser / resources / service_worker / serviceworker_internals.html [blame]

<!doctype html>
<html dir="ltr" lang="en">
<head>
  <meta charset="utf-8">
  <title>chrome://serviceworker-internals</title>
  <link rel="stylesheet" href="chrome://resources/css/text_defaults.css">
  <link rel="stylesheet" href="chrome://resources/css/widgets.css">
  <link rel="stylesheet" href="serviceworker_internals.css">
</head>
<body>
  <!-- templates -->
  <div style="display:none">
    <div id="serviceworker-version-template" class="serviceworker-version">
      <div class="serviceworker-status">
        <span>Installation Status:</span>
        <span jscontent="$this.status"></span>
      </div>
      <div class="serviceworker-running-status">
        <span>Running Status:</span>
        <span jscontent="$this.running_status"></span>
      </div>
      <div class="serviceworker-fetch-handler-existence">
        <span>Fetch handler existence:</span>
        <span jscontent="$this.fetch_handler_existence"></span>
      </div>
      <div class="serviceworker-fetch-handler-type">
        <span>Fetch handler type:</span>
        <span jscontent="$this.fetch_handler_type"></span>
      </div>
      <div class="serviceworker-router-rules" jsdisplay="$this.router_rules">
        <span>Static router rules:</span>
        <span jscontent="$this.router_rules"></span>
      </div>
      <div class="serviceworker-script_url">
        <span>Script:</span>
        <span jscontent="$this.script_url"></span>
      </div>
      <div class="serviceworker-vid">
        <span>Version ID:</span>
        <span jscontent="$this.version_id"></span>
      </div>
      <div class="serviceworker-pid">
        <span>Renderer process ID:</span>
        <span jscontent="$this.process_id"></span>
      </div>
      <div class="serviceworker-tid">
        <span>Renderer thread ID:</span>
        <span jscontent="$this.thread_id"></span>
      </div>
      <div class="serviceworker-rid">
        <span>DevTools agent route ID:</span>
        <span jscontent="$this.devtools_agent_route_id"></span>
      </div>
      <div class="serviceworker-clients" jsselect="$this.clients">
        <div>Client: </div>
        <div transclude="serviceworker-client-template"></div>
      </div>
      <div>
        <div>Log:</div>
        <textarea class="serviceworker-log"
            jsvalues=".partition_id:$partition_id;.version_id:$this.version_id"
            rows="3" cols="120" readonly jscontent="$this.log"></textarea>
      </div>
      <div class="worker-controls">
        <button href="#" class="stop"
            jsvalues=".cmdArgs:{partition_id:$partition_id,version_id:version_id}"
            jsdisplay="$this.running_status == 'RUNNING'">Stop</button>
        <button href="#" class="inspect"
            jsvalues=".cmdArgs:{process_host_id:process_host_id,devtools_agent_route_id:devtools_agent_route_id}"
            jsdisplay="$this.running_status == 'RUNNING'">Inspect</button>
        <span class="operation-status" style="display: none">Running...</span>
      </div>
    </div>
    <div id="serviceworker-registration-template"
        class="serviceworker-registration">
      <div class="serviceworker-scope">
        <span>Scope:</span>
        <span jscontent="scope"></span>
      </div>
      <!-- Storage Partitioning -->
      <div class="serviceworker-storage-key-wrapper"
        jsdisplay="$this.third_party_storage_partitioning_enabled">
        Storage key:
        <div class="serviceworker-storage-key">
          <div class="serviceworker-origin">
            <span>Origin:</span>
            <span jscontent="$this.origin"></span>
          </div>
          <div class="serviceworker-top-level-site">
            <span>Top level site:</span>
            <span jscontent="$this.top_level_site"></span>
          </div>
          <div class="serviceworker-ancestor-chain-bit">
            <span>Ancestor chain bit:</span>
            <span jscontent="$this.ancestor_chain_bit"></span>
          </div>
          <div class="serviceworker-nonce"
            jsdisplay="$this.nonce !== '<null>'">
            <span>Nonce:</span>
            <span jscontent="$this.nonce"></span>
          </div>
        </div>
      </div>
      <!-- Storage Partitioning ends -->
      <div class="serviceworker-rid">
        <span>Registration ID:</span>
        <span jscontent="registration_id"></span>
        <span jsdisplay="$this.unregistered">(unregistered)</span>
      </div>
      <div class="serviceworker-navigation-preload-enabled">
        <span>Navigation preload enabled:</span>
        <span jscontent="$this.navigation_preload_enabled"></span>
      </div>
      <div class="serviceworker-navigation-preload-header-length">
        <span>Navigation preload header length:</span>
        <span jscontent="$this.navigation_preload_header_length"></span>
      </div>
      <div jsselect="$this.active">
        Active worker:
        <div transclude="serviceworker-version-template"></div>
      </div>
      <div jsselect="$this.waiting">
        Waiting worker:
        <div transclude="serviceworker-version-template"></div>
      </div>
      <div class="registration-controls" jsdisplay="!$this.unregistered">
        <button href="#" class="unregister"
            jsvalues=".cmdArgs:{partition_id:$partition_id,scope:scope,storage_key:storage_key}">
          Unregister
        </button>
        <button href="#" class="start"
            jsdisplay="$this.active.running_status != 'RUNNING'"
             jsvalues=".cmdArgs:{partition_id:$partition_id,scope:scope,storage_key:storage_key}">
          Start
        </button>
        <span class="operation-status" style="display: none">Running...</span>
      </div>
    </div>
    <div id="serviceworker-list-template"
        jsvalues="$partition_id:$this.partition_id;.partition_id:$this.partition_id"
        jsdisplay="$this.stored_registrations.length + $this.unregistered_registrations.length + $this.unregistered_versions.length > 0">
      <div class="serviceworker-summary">
        <span jsdisplay="$this.partition_path">
          <span>Registrations in: </span>
          <span jscontent="$this.partition_path"></span>
        </span>
        <span jsdisplay="!$this.partition_path">
          <span>Registrations: Incognito </span>
        </span>
        <span jscontent="'(' + $this.stored_registrations.length + ')'"></span>
      </div>
      <div class="serviceworker-item" jsselect="$this.stored_registrations">
        <div transclude="serviceworker-registration-template"></div>
      </div>
      <div class="serviceworker-item"
          jsselect="$this.unregistered_registrations">
        <div transclude="serviceworker-registration-template"></div>
      </div>
      <div class="serviceworker-item" jsselect="$this.unregistered_versions">
        Unregistered worker:
        <div transclude="serviceworker-version-template"></div>
      </div>
    </div>
    <div id="serviceworker-options-template">
      <div class="checkbox">
        <label>
            <input type="checkbox" class="debug_on_start"
                   jsvalues=".checked:$this.debug_on_start">
            <span>
              Open DevTools window and pause JavaScript execution on Service Worker startup for debugging.
            </span>
        </label>
      </div>
    </div>
    <div id="serviceworker-client-template" class="serviceworker-client">
      <div>
        <span>ID: </span><span jscontent="$this.client_id"></span>
      </div>
      <div>
        <span>URL: </span><span jscontent="$this.url"></span>
      </div>
    </div>
  </div>
  <!-- templates end -->
  <h1>ServiceWorker</h1>
  <div class="content">
    <div id="serviceworker-options"></div>
    <div id="serviceworker-list"></div>
  </div>
  <script type="module" src="serviceworker_internals.js"></script>
</body>
</html>