Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5029)

Unified Diff: chrome/browser/resources/ssl/roadblock.html

Issue 23965003: New SSL blocking screen (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/ssl/blocking.js ('k') | chrome/browser/resources/ssl/roadblock.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/ssl/roadblock.html
diff --git a/chrome/browser/resources/ssl/roadblock.html b/chrome/browser/resources/ssl/roadblock.html
index 8bebfc610dfae0b24bf89a6026580b755299d99f..f2c7f4369c591a227155254237e4236603feb204 100644
--- a/chrome/browser/resources/ssl/roadblock.html
+++ b/chrome/browser/resources/ssl/roadblock.html
@@ -78,95 +78,8 @@
}
</style>
<script src="../../../../ui/webui/resources/js/assert.js"></script>
- <script>
- // Should match SSLBlockingPageCommands in ssl_blocking_page.cc.
- var CMD_DONT_PROCEED = 0;
- var CMD_PROCEED = 1;
- var CMD_FOCUS = 2;
- var CMD_MORE = 3;
-
- var showedMore = false;
- var keyPressState = 0;
- var gainFocus = false;
- var setupExperiment = false;
-
- function $(o) {
- return document.getElementById(o);
- }
-
- function sendCommand(cmd) {
- window.domAutomationController.setAutomationId(1);
- window.domAutomationController.send(cmd);
- }
-
- function toggleMoreInfo(collapse) {
- $('more-info-long').hidden = collapse;
- $('more-info-short').hidden = !collapse;
- if (!collapse && !showedMore) {
- sendCommand(CMD_MORE);
- showedMore = true;
- }
- }
-
- // This allows errors to be skippped by typing "proceed" into the page.
- function keyPressHandler(e) {
- var sequence = 'proceed';
- if (sequence.charCodeAt(keyPressState) == e.keyCode) {
- keyPressState++;
- if (keyPressState == sequence.length) {
- sendCommand(CMD_PROCEED);
- keyPressState = 0;
- }
- } else {
- keyPressState = 0;
- }
- }
-
- // Supports UMA timing, which starts after the warning is first viewed.
- function handleFocusEvent() {
- if (gainFocus == false) {
- sendCommand(CMD_FOCUS);
- gainFocus = true;
- }
- }
-
- // UI modifications and event listeners that take place after load.
- function setupEvents() {
- if (templateData.errorType == "overridable") {
- // This is the blocking page you can click through.
- $('proceed-button').hidden = false;
- $('proceed-button').addEventListener('click', function() {
- sendCommand(CMD_PROCEED);
- });
- } else {
- document.addEventListener('keypress', keyPressHandler);
- }
-
- if ($('more-info-title').textContent == '') {
- $('more-info-short').hidden = true;
- $('more-info-long').hidden = true;
- $('twisty-closed').style.display = 'none';
- } else {
- $('more-info-short').addEventListener('click', function() {
- toggleMoreInfo(false);
- });
- $('more-info-long').addEventListener('click', function() {
- toggleMoreInfo(true);
- });
- }
-
- $('exit-button').addEventListener('click', function() {
- sendCommand(CMD_DONT_PROCEED);
- });
-
- document.addEventListener('contextmenu', function(e) {
- e.preventDefault();
- });
- }
-
- window.addEventListener('focus', handleFocusEvent);
- document.addEventListener('DOMContentLoaded', setupEvents);
- </script>
+ <script src="ssl_errors_common.js"></script>
+ <script src="roadblock.js"></script>
</head>
<body>
<div class="box">
« no previous file with comments | « chrome/browser/resources/ssl/blocking.js ('k') | chrome/browser/resources/ssl/roadblock.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698