| 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> | 
|  |