Extension syncing: Introduce a NeedsSync pref
[chromium-blink-merge.git] / components / data_reduction_proxy / content / resources / interstitial.js
bloba82b4d5800a7dcbc3384c6876a663d5a9c949f62
1 // Copyright 2015 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 var expandedDetails = false;
6 var keyPressState = 0;
8 /*
9 * A convenience method for sending commands to the parent page.
10 * @param {string} cmd The command to send.
12 function sendCommand(cmd) {
13 window.domAutomationController.setAutomationId(1);
14 window.domAutomationController.send(cmd);
17 function setupEvents() {
18 $('primary-button').addEventListener('click', function() {
19 sendCommand(DRP_CMD_TAKE_ME_BACK);
20 });
22 $('secondary-button').addEventListener('click', function() {
23 sendCommand(DRP_CMD_PROCEED);
24 });
26 preventDefaultOnPoundLinkClicks();
29 document.addEventListener('DOMContentLoaded', setupEvents);