1 // Copyright (c) 2012 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.
5 function sendCommand(cmd) {
6 window.domAutomationController.setAutomationId(1);
7 window.domAutomationController.send(cmd);
10 function initialize() {
11 if (loadTimeData.getBoolean('allowAccessRequests')) {
12 $('request-access-button').onclick = function(event) {
13 updateAfterRequestSent();
14 sendCommand('request');
17 $('request-access-button').hidden = true;
19 $('back-button').onclick = function(event) {
25 * Updates the interstitial to show that the request was sent.
27 function updateAfterRequestSent() {
28 $('error-img').hidden = true;
29 $('request-access-button').hidden = true;
30 $('block-page-message').hidden = true;
31 $('request-sent-message').hidden = false;
34 document.addEventListener('DOMContentLoaded', initialize);