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

Unified Diff: chrome/browser/resources/pdf/elements/viewer-toolbar/viewer-toolbar.html

Issue 111723010: Added toolbar Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 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.html
diff --git a/chrome/browser/resources/pdf/elements/viewer-toolbar/viewer-toolbar.html b/chrome/browser/resources/pdf/elements/viewer-toolbar/viewer-toolbar.html
new file mode 100644
index 0000000000000000000000000000000000000000..b73353323f125a2535e7c92b75e61ec797512084
--- /dev/null
+++ b/chrome/browser/resources/pdf/elements/viewer-toolbar/viewer-toolbar.html
@@ -0,0 +1,43 @@
+<polymer-element name="viewer-toolbar">
+ <template>
+ <link rel="stylesheet" href="viewer-toolbar.css">
+ <div id="hover" on-mouseover="{{fadeIn}}" on-mousemove="{{fadeIn}}" on-mouseout="{{fadeOut}}">
+ <div id="toolbar">
+ <content></content>
+ </div>
+ </div>
+ </template>
+ <script>
+ Polymer('viewer-toolbar', {
+ fadingIn: false,
+ ready: function() {
+ this.fadeOut();
+ },
+ fadeIn: function(event, detail, sender) {
+ this.fadingIn = true;
+ this.updateStyle();
+ },
+ fadeOut: function() {
+ this.fadingIn = false;
+ this.updateStyle();
+ },
+ updateStyle: function() {
+ if (this.fadingIn) {
+ this.style.setProperty("-webkit-transition",
+ "opacity 0.4s ease-in-out");
+ this.style.opacity = 1;
+ } else {
+ if (window.getComputedStyle(this).getPropertyValue("opacity") == 1) {
+ this.style.setProperty("-webkit-transition",
+ "opacity 0.4s ease-in-out 3s");
+ this.style.opacity = 0;
+ } else {
+ // Let the toolbar finish fading in before fading out.
+ var me = this;
+ setTimeout(function() { me.updateStyle(); }, 400);
+ }
+ }
+ }
+ });
+ </script>
+</polymer-element>
« no previous file with comments | « chrome/browser/resources/pdf/elements/viewer-toolbar/viewer-toolbar.css ('k') | chrome/browser/resources/pdf/index.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698