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

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

Issue 110723007: Add the viewer toolbar to the PDF extension (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <polymer-element name="viewer-toolbar" attributes="fadingIn"
2 on-mouseover="{{fadeIn}}" on-mousemove="{{fadeIn}}"
3 on-mouseout="{{fadeOut}}">
4 <template>
5 <link rel="stylesheet" href="viewer-toolbar.css">
6 <div id="toolbar">
7 <content></content>
8 </div>
9 </template>
10 <script>
11 Polymer('viewer-toolbar', {
12 fadingIn: false,
13 timerId: undefined,
14 ready: function() {
15 this.fadingInChanged();
16 },
17 fadeIn: function() {
18 this.fadingIn = true;
19 },
20 fadeOut: function() {
21 this.fadingIn = false;
22 },
23 fadingInChanged: function() {
24 if (this.fadingIn) {
25 this.style.opacity = 1;
26 if (this.timerId !== undefined) {
27 clearTimeout(this.timerId);
28 this.timerId = undefined;
29 }
30 } else {
31 if (this.timerId === undefined) {
32 this.timerId = setTimeout(
33 function() {
34 this.style.opacity = 0;
35 this.timerId = undefined;
36 }.bind(this), 3000);
37 }
38 }
39 }
40 });
41 </script>
42 </polymer-element>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698