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

Unified Diff: chrome/browser/resources/pdf/elements/viewer-toolbar/viewer-toolbar.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-toolbar/viewer-toolbar.js
diff --git a/chrome/browser/resources/pdf/elements/viewer-toolbar/viewer-toolbar.js b/chrome/browser/resources/pdf/elements/viewer-toolbar/viewer-toolbar.js
deleted file mode 100644
index 28f90523e35b0821ab0c727acc76b37f6f5ddfb7..0000000000000000000000000000000000000000
--- a/chrome/browser/resources/pdf/elements/viewer-toolbar/viewer-toolbar.js
+++ /dev/null
@@ -1,74 +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-toolbar',
-
- properties: {
- fadingIn: {
- type: Boolean,
- value: false,
- observer: 'fadingInChanged'
- }
- },
-
- timerId_: undefined,
-
- inInitialFadeIn_: false,
-
- ready: function() {
- this.mousemoveCallback = function(e) {
- var rect = this.getBoundingClientRect();
- if (e.clientX >= rect.left && e.clientX <= rect.right &&
- e.clientY >= rect.top && e.clientY <= rect.bottom) {
- this.fadingIn = true;
- // If we hover over the toolbar, cancel the initial fade in.
- if (this.inInitialFadeIn_)
- this.inInitialFadeIn_ = false;
- } else {
- // Initially we want to keep the toolbar up for a longer period.
- if (!this.inInitialFadeIn_)
- this.fadingIn = false;
- }
- }.bind(this);
- },
-
- attached: function() {
- this.parentNode.addEventListener('mousemove', this.mousemoveCallback);
- },
-
- detached: function() {
- this.parentNode.removeEventListener('mousemove', this.mousemoveCallback);
- },
-
- initialFadeIn: function() {
- this.inInitialFadeIn_ = true;
- this.fadeIn();
- this.fadeOutAfterDelay(6000);
- },
-
- fadingInChanged: function() {
- if (this.fadingIn) {
- this.fadeIn();
- } else {
- if (this.timerId_ === undefined)
- this.fadeOutAfterDelay(3000);
- }
- },
-
- fadeIn: function() {
- this.style.opacity = 1;
- clearTimeout(this.timerId_);
- this.timerId_ = undefined;
- },
-
- fadeOutAfterDelay: function(delay) {
- this.timerId_ = setTimeout(
- function() {
- this.style.opacity = 0;
- this.timerId_ = undefined;
- this.inInitialFadeIn_ = false;
- }.bind(this), delay);
- }
-});
« no previous file with comments | « chrome/browser/resources/pdf/elements/viewer-toolbar/viewer-toolbar.html ('k') | chrome/browser/resources/pdf/index.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698