| OLD | NEW |
| 1 <!-- | 1 <!-- |
| 2 -- Copyright 2015 The Chromium Authors. All rights reserved. | 2 -- Copyright 2015 The Chromium Authors. All rights reserved. |
| 3 -- Use of this source code is governed by a BSD-style license that can be | 3 -- Use of this source code is governed by a BSD-style license that can be |
| 4 -- found in the LICENSE file. | 4 -- found in the LICENSE file. |
| 5 --> | 5 --> |
| 6 | 6 |
| 7 <link rel="import" href="chrome://resources/polymer/polymer/polymer.html"> | 7 <link rel="import" href="chrome://resources/polymer/v1_0/polymer/polymer.html"> |
| 8 <link rel="import" href="volume_controller.html"> | 8 <link rel="import" href="volume_controller.html"> |
| 9 | 9 |
| 10 <polymer-element name="control-panel"> | 10 <dom-module id="control-panel"> |
| 11 <link rel="import" type="css" href="control_panel.css"> |
| 11 <template> | 12 <template> |
| 12 <link rel="stylesheet" href="control_panel.css"> | |
| 13 | |
| 14 <div class="controls"> | 13 <div class="controls"> |
| 15 <div class="upper-controls time-controls"> | 14 <div class="upper-controls time-controls"> |
| 16 <div class="time media-control"> | 15 <div class="time media-control"> |
| 17 <div class="current">{{timeString_}}</div> | 16 <div class="current">[[time2string_(time)]]</div> |
| 18 </div> | 17 </div> |
| 19 <div class="progress media-control custom-slider"> | 18 <div class="progress media-control custom-slider"> |
| 20 <input name="timeInput" type="range" touch-action="manipulation" | 19 <input name="timeInput" type="range" touch-action="manipulation" |
| 21 min="0" max="{{duration}}" value="{{time}}"> | 20 min="0" max="[[duration]]" value="{{time::input}}"> |
| 22 <div class="bar"> | 21 <div class="bar"> |
| 23 <div class="filled" style="width: {{time/duration*100}}%;"></div> | 22 <div class="filled" style$="[[computeProgressBarStyle_(time, duratio
n)]]"></div> |
| 24 <div class="cap left"></div> | 23 <div class="cap left"></div> |
| 25 <div class="cap right"></div> | 24 <div class="cap right"></div> |
| 26 </div> | 25 </div> |
| 27 </div> | 26 </div> |
| 28 <div class="time media-control"> | 27 <div class="time media-control"> |
| 29 <div class="duration">{{durationString_}}</div> | 28 <div class="duration">[[time2string_(duration)]]</div> |
| 30 </div> | 29 </div> |
| 31 </div> | 30 </div> |
| 32 <div class="lower-controls audio-controls"> | 31 <div class="lower-controls audio-controls"> |
| 33 <!-- Shuffle toggle button in the bottom line. --> | 32 <!-- Shuffle toggle button in the bottom line. --> |
| 34 <button class="shuffle-mode media-button toggle" state="default"> | 33 <button class="shuffle-mode media-button toggle" state="default"> |
| 35 <label> | 34 <label> |
| 36 <input id="shuffleCheckbox" | 35 <input id="shuffleCheckbox" |
| 37 type="checkbox" | 36 type="checkbox" |
| 38 checked="{{model.shuffle}}"> | 37 checked="{{shuffle::change}}"> |
| 39 <span class="icon"></span> | 38 <span class="icon"></span> |
| 40 </label> | 39 </label> |
| 41 </button> | 40 </button> |
| 42 | 41 |
| 43 <!-- Repeat toggle button in the bottom line. --> | 42 <!-- Repeat toggle button in the bottom line. --> |
| 44 <button class="repeat media-button toggle" state="default"> | 43 <button class="repeat media-button toggle" state="default"> |
| 45 <label> | 44 <label> |
| 46 <input id="repeatCheckbox" | 45 <input id="repeatCheckbox" |
| 47 type="checkbox" | 46 type="checkbox" |
| 48 checked="{{model.repeat}}"> | 47 checked="{{repeat::change}}"> |
| 49 <span class="icon"></span> | 48 <span class="icon"></span> |
| 50 </label> | 49 </label> |
| 51 </button> | 50 </button> |
| 52 | 51 |
| 53 <!-- Prev button in the bottom line. --> | 52 <!-- Prev button in the bottom line. --> |
| 54 <button class="previous media-button" | 53 <button class="previous media-button" |
| 55 state="default" | 54 state="default" |
| 56 on-click="{{previousClick}}"> | 55 on-click="previousClick"> |
| 57 <div class="normal default"></div> | 56 <div class="normal default"></div> |
| 58 <div class="disabled"></div> | 57 <div class="disabled"></div> |
| 59 </button> | 58 </button> |
| 60 | 59 |
| 61 <!-- Play button in the bottom line. --> | 60 <!-- Play button in the bottom line. --> |
| 62 <button class="play media-control media-button" | 61 <button class="play media-control media-button" |
| 63 state='{{playing ? "playing" : "ended"}}' | 62 state$="[[computePlayState_(playing)]]" |
| 64 on-click="{{playClick}}"> | 63 on-click="playClick"> |
| 65 <div class="normal playing"></div> | 64 <div class="normal playing"></div> |
| 66 <div class="normal ended"></div> | 65 <div class="normal ended"></div> |
| 67 <div class="disabled"></div> | 66 <div class="disabled"></div> |
| 68 </button> | 67 </button> |
| 69 | 68 |
| 70 <!-- Next button in the bottom line. --> | 69 <!-- Next button in the bottom line. --> |
| 71 <button class="next media-button" | 70 <button class="next media-button" |
| 72 state="default" | 71 state="default" |
| 73 on-click="{{nextClick}}"> | 72 on-click="nextClick"> |
| 74 <div class="normal default"></div> | 73 <div class="normal default"></div> |
| 75 <div class="disabled"></div> | 74 <div class="disabled"></div> |
| 76 </button> | 75 </button> |
| 77 | 76 |
| 78 <div id="volumeContainer" | 77 <div id="volumeContainer" |
| 79 class="default-hidden" | 78 class="default-hidden" |
| 80 anchor-point="bottom center"> | 79 anchor-point="bottom center"> |
| 81 <volume-controller id="volumeSlider" | 80 <volume-controller id="volumeSlider" value="{{volume}}" |
| 82 width="32" height="85" value="50"> | 81 width="32" height="85" value="50"> |
| 83 </volume-controller> | 82 </volume-controller> |
| 84 | 83 |
| 85 <polymer-anchor-point id="anchorHelper"></polymer-anchor-point> | 84 <polymer-anchor-point id="anchorHelper"></polymer-anchor-point> |
| 86 </div> | 85 </div> |
| 87 | 86 |
| 88 <!-- Volume button in the bottom line. --> | 87 <!-- Volume button in the bottom line. --> |
| 89 <button id="volumeButton" | 88 <button id="volumeButton" |
| 90 class="volume media-button toggle" | 89 class="volume media-button toggle" |
| 91 state="default" | 90 state="default" |
| 92 on-click="{{volumeButtonClick}}" | 91 on-click="volumeButtonClick" |
| 93 anchor-point="bottom center"> | 92 anchor-point="bottom center"> |
| 94 <label> | 93 <label> |
| 95 <input type="checkbox" checked="{{volumeSliderShown}}"> | 94 <input type="checkbox" checked="{{volumeSliderShown::change}}"> |
| 96 <span class="icon"></span> | 95 <span class="icon"></span> |
| 97 </label> | 96 </label> |
| 98 </button> | 97 </button> |
| 99 | 98 |
| 100 <!-- Playlist button in the bottom line. --> | 99 <!-- Playlist button in the bottom line. --> |
| 101 <button id="playlistButton" | 100 <button id="playlistButton" |
| 102 class="playlist media-button toggle" | 101 class="playlist media-button toggle" |
| 103 state="default"> | 102 state="default"> |
| 104 <label> | 103 <label> |
| 105 <input type="checkbox" checked="{{model.expanded}}"> | 104 <input type="checkbox" checked="{{expanded::change}}"> |
| 106 <span class="icon"></span> | 105 <span class="icon"></span> |
| 107 </label> | 106 </label> |
| 108 </button> | 107 </button> |
| 109 </div> | 108 </div> |
| 110 </div> | 109 </div> |
| 111 </template> | 110 </template> |
| 112 <script src="control_panel.js"></script> | 111 </dom-module> |
| 113 </polymer-element> | 112 |
| 113 <script src="control_panel.js"></script> |
| OLD | NEW |