| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Should match SSLBlockingPageCommands in ssl_blocking_page.cc. | 5 // Should match SSLBlockingPageCommands in ssl_blocking_page.cc. |
| 6 var CMD_DONT_PROCEED = 0; | 6 var CMD_DONT_PROCEED = 0; |
| 7 var CMD_PROCEED = 1; | 7 var CMD_PROCEED = 1; |
| 8 var CMD_FOCUS = 2; | 8 var CMD_MORE = 2; |
| 9 var CMD_MORE = 3; | 9 var CMD_RELOAD = 3; |
| 10 var CMD_RELOAD = 4; | |
| 11 | 10 |
| 12 var keyPressState = 0; | 11 var keyPressState = 0; |
| 13 | 12 |
| 14 function $(o) { | 13 function $(o) { |
| 15 return document.getElementById(o); | 14 return document.getElementById(o); |
| 16 } | 15 } |
| 17 | 16 |
| 18 function sendCommand(cmd) { | 17 function sendCommand(cmd) { |
| 19 window.domAutomationController.setAutomationId(1); | 18 window.domAutomationController.setAutomationId(1); |
| 20 window.domAutomationController.send(cmd); | 19 window.domAutomationController.send(cmd); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 35 } | 34 } |
| 36 | 35 |
| 37 function sharedSetup() { | 36 function sharedSetup() { |
| 38 document.addEventListener('contextmenu', function(e) { | 37 document.addEventListener('contextmenu', function(e) { |
| 39 e.preventDefault(); | 38 e.preventDefault(); |
| 40 }); | 39 }); |
| 41 document.addEventListener('keypress', keyPressHandler); | 40 document.addEventListener('keypress', keyPressHandler); |
| 42 } | 41 } |
| 43 | 42 |
| 44 document.addEventListener('DOMContentLoaded', sharedSetup); | 43 document.addEventListener('DOMContentLoaded', sharedSetup); |
| OLD | NEW |