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_MORE = 2; | 8 var CMD_MORE = 2; |
9 var CMD_RELOAD = 3; | 9 var CMD_RELOAD = 3; |
10 var CMD_HELP = 4; | 10 var CMD_HELP = 4; |
(...skipping 23 matching lines...) Expand all Loading... |
34 } | 34 } |
35 } | 35 } |
36 | 36 |
37 function sharedSetup() { | 37 function sharedSetup() { |
38 document.addEventListener('contextmenu', function(e) { | 38 document.addEventListener('contextmenu', function(e) { |
39 e.preventDefault(); | 39 e.preventDefault(); |
40 }); | 40 }); |
41 document.addEventListener('keypress', keyPressHandler); | 41 document.addEventListener('keypress', keyPressHandler); |
42 } | 42 } |
43 | 43 |
| 44 // This applies SSL-specific styling to the V2 security interstitials. |
| 45 function applySSLStyle() { |
| 46 $('explanation-paragraph').innerHTML = |
| 47 loadTimeData.getString('explanationParagraph'); |
| 48 $('explanation-paragraph').classList.toggle('hidden'); |
| 49 $('final-paragraph').innerHTML = loadTimeData.getString('finalParagraph'); |
| 50 $('final-paragraph').classList.toggle('hidden'); |
| 51 |
| 52 $('body').classList.add('ssl'); |
| 53 } |
| 54 |
44 document.addEventListener('DOMContentLoaded', sharedSetup); | 55 document.addEventListener('DOMContentLoaded', sharedSetup); |
OLD | NEW |