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

Unified Diff: chrome/browser/resources/pdf/elements/viewer-password-screen-legacy/viewer-password-screen-legacy.js

Issue 1521913002: PDF: Delete non-material viewer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
Index: chrome/browser/resources/pdf/elements/viewer-password-screen-legacy/viewer-password-screen-legacy.js
diff --git a/chrome/browser/resources/pdf/elements/viewer-password-screen-legacy/viewer-password-screen-legacy.js b/chrome/browser/resources/pdf/elements/viewer-password-screen-legacy/viewer-password-screen-legacy.js
deleted file mode 100644
index 8d09e153e50ed3d6452f6f396b12fa43fc71487e..0000000000000000000000000000000000000000
--- a/chrome/browser/resources/pdf/elements/viewer-password-screen-legacy/viewer-password-screen-legacy.js
+++ /dev/null
@@ -1,62 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-Polymer({
- is: 'viewer-password-screen-legacy',
-
- properties: {
- text: {
- type: String,
- value: 'This document is password protected. Please enter a password.',
- },
-
- active: {
- type: Boolean,
- value: false,
- observer: 'activeChanged'
- }
- },
-
- timerId: undefined,
-
- ready: function() {
- this.activeChanged();
- },
-
- accept: function() {
- this.active = false;
- },
-
- deny: function() {
- this.$.password.disabled = false;
- this.$.submit.disabled = false;
- this.$.password.focus();
- this.$.password.select();
- },
-
- submit: function(e) {
- // Prevent the default form submission behavior.
- e.preventDefault();
- if (this.$.password.value.length == 0)
- return;
- this.$.password.disabled = true;
- this.$.submit.disabled = true;
- this.fire('password-submitted', {password: this.$.password.value});
- },
-
- activeChanged: function() {
- clearTimeout(this.timerId);
- this.timerId = undefined;
- if (this.active) {
- this.style.visibility = 'visible';
- this.style.opacity = 1;
- this.$.password.focus();
- } else {
- this.style.opacity = 0;
- this.timerId = setTimeout(function() {
- this.style.visibility = 'hidden';
- }.bind(this), 400);
- }
- }
-});

Powered by Google App Engine
This is Rietveld 408576698