| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <!-- | 2 <!-- |
| 3 Copyright (c) 2015 The Chromium Authors. All rights reserved. | 3 Copyright (c) 2015 The Chromium Authors. All rights reserved. |
| 4 Use of this source code is governed by a BSD-style license that can be | 4 Use of this source code is governed by a BSD-style license that can be |
| 5 found in the LICENSE file. | 5 found in the LICENSE file. |
| 6 --> | 6 --> |
| 7 | 7 |
| 8 <link rel="import" href="/tracing/base/base64.html"> | 8 <link rel="import" href="/tracing/base/base64.html"> |
| 9 <link rel="import" href="/tracing/extras/chrome/cc/picture.html"> | 9 <link rel="import" href="/tracing/extras/chrome/cc/picture.html"> |
| 10 <link rel="import" href="/tracing/ui/analysis/generic_object_view.html"> | 10 <link rel="import" href="/tracing/ui/analysis/generic_object_view.html"> |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 | 152 |
| 153 this.trackMouse_(); | 153 this.trackMouse_(); |
| 154 | 154 |
| 155 this.displayItemInfo_ = this.querySelector('display-item-info'); | 155 this.displayItemInfo_ = this.querySelector('display-item-info'); |
| 156 this.displayItemInfo_.addEventListener( | 156 this.displayItemInfo_.addEventListener( |
| 157 'click', this.onDisplayItemInfoClick_.bind(this), false); | 157 'click', this.onDisplayItemInfoClick_.bind(this), false); |
| 158 | 158 |
| 159 this.displayItemListView_ = new tr.ui.b.ListView(); | 159 this.displayItemListView_ = new tr.ui.b.ListView(); |
| 160 this.displayItemListView_.addEventListener('selection-changed', | 160 this.displayItemListView_.addEventListener('selection-changed', |
| 161 this.onDisplayItemListSelection_.bind(this)); | 161 this.onDisplayItemListSelection_.bind(this)); |
| 162 this.displayItemInfo_.appendChild(this.displayItemListView_); | 162 Polymer.dom(this.displayItemInfo_).appendChild(this.displayItemListView_); |
| 163 | 163 |
| 164 this.displayListFilename_ = this.querySelector('.dlfilename'); | 164 this.displayListFilename_ = this.querySelector('.dlfilename'); |
| 165 this.displayListExportButton_ = this.querySelector('.dlexport'); | 165 this.displayListExportButton_ = this.querySelector('.dlexport'); |
| 166 this.displayListExportButton_.addEventListener( | 166 this.displayListExportButton_.addEventListener( |
| 167 'click', this.onExportDisplayListClicked_.bind(this)); | 167 'click', this.onExportDisplayListClicked_.bind(this)); |
| 168 | 168 |
| 169 this.skpFilename_ = this.querySelector('.skpfilename'); | 169 this.skpFilename_ = this.querySelector('.skpfilename'); |
| 170 this.skpExportButton_ = this.querySelector('.skpexport'); | 170 this.skpExportButton_ = this.querySelector('.skpexport'); |
| 171 this.skpExportButton_.addEventListener( | 171 this.skpExportButton_.addEventListener( |
| 172 'click', this.onExportSkPictureClicked_.bind(this)); | 172 'click', this.onExportSkPictureClicked_.bind(this)); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 202 | 202 |
| 203 set displayItemList(displayItemList) { | 203 set displayItemList(displayItemList) { |
| 204 this.displayItemList_ = displayItemList; | 204 this.displayItemList_ = displayItemList; |
| 205 this.picture = this.displayItemList_; | 205 this.picture = this.displayItemList_; |
| 206 | 206 |
| 207 this.displayItemListView_.clear(); | 207 this.displayItemListView_.clear(); |
| 208 this.displayItemList_.items.forEach(function(item) { | 208 this.displayItemList_.items.forEach(function(item) { |
| 209 var listItem = document.createElement( | 209 var listItem = document.createElement( |
| 210 'tr-ui-e-chrome-cc-display-item-list-item'); | 210 'tr-ui-e-chrome-cc-display-item-list-item'); |
| 211 listItem.data = item; | 211 listItem.data = item; |
| 212 this.displayItemListView_.appendChild(listItem); | 212 Polymer.dom(this.displayItemListView_).appendChild(listItem); |
| 213 }.bind(this)); | 213 }.bind(this)); |
| 214 }, | 214 }, |
| 215 | 215 |
| 216 set picture(picture) { | 216 set picture(picture) { |
| 217 this.picture_ = picture; | 217 this.picture_ = picture; |
| 218 | 218 |
| 219 // Hide the ops list if we are showing the "main" display item list. | 219 // Hide the ops list if we are showing the "main" display item list. |
| 220 var showOpsList = picture && picture !== this.displayItemList_; | 220 var showOpsList = picture && picture !== this.displayItemList_; |
| 221 this.updateDrawOpsList_(showOpsList); | 221 this.updateDrawOpsList_(showOpsList); |
| 222 | 222 |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 } else { | 361 } else { |
| 362 this.pictureOpsListView_.classList.remove('hasPictureOps'); | 362 this.pictureOpsListView_.classList.remove('hasPictureOps'); |
| 363 this.pictureOpsListDragHandle_.classList.remove('hasPictureOps'); | 363 this.pictureOpsListDragHandle_.classList.remove('hasPictureOps'); |
| 364 } | 364 } |
| 365 }, | 365 }, |
| 366 | 366 |
| 367 trackMouse_: function() { | 367 trackMouse_: function() { |
| 368 this.mouseModeSelector_ = document.createElement( | 368 this.mouseModeSelector_ = document.createElement( |
| 369 'tr-ui-b-mouse-mode-selector'); | 369 'tr-ui-b-mouse-mode-selector'); |
| 370 this.mouseModeSelector_.targetElement = this.rasterArea_; | 370 this.mouseModeSelector_.targetElement = this.rasterArea_; |
| 371 this.rasterArea_.appendChild(this.mouseModeSelector_); | 371 Polymer.dom(this.rasterArea_).appendChild(this.mouseModeSelector_); |
| 372 | 372 |
| 373 this.mouseModeSelector_.supportedModeMask = | 373 this.mouseModeSelector_.supportedModeMask = |
| 374 tr.ui.b.MOUSE_SELECTOR_MODE.ZOOM; | 374 tr.ui.b.MOUSE_SELECTOR_MODE.ZOOM; |
| 375 this.mouseModeSelector_.mode = tr.ui.b.MOUSE_SELECTOR_MODE.ZOOM; | 375 this.mouseModeSelector_.mode = tr.ui.b.MOUSE_SELECTOR_MODE.ZOOM; |
| 376 this.mouseModeSelector_.defaultMode = tr.ui.b.MOUSE_SELECTOR_MODE.ZOOM; | 376 this.mouseModeSelector_.defaultMode = tr.ui.b.MOUSE_SELECTOR_MODE.ZOOM; |
| 377 this.mouseModeSelector_.settingsKey = 'pictureDebugger.mouseModeSelector'; | 377 this.mouseModeSelector_.settingsKey = 'pictureDebugger.mouseModeSelector'; |
| 378 | 378 |
| 379 this.mouseModeSelector_.addEventListener('beginzoom', | 379 this.mouseModeSelector_.addEventListener('beginzoom', |
| 380 this.onBeginZoom_.bind(this)); | 380 this.onBeginZoom_.bind(this)); |
| 381 this.mouseModeSelector_.addEventListener('updatezoom', | 381 this.mouseModeSelector_.addEventListener('updatezoom', |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 458 var rawData = tr.b.Base64.atob(this.picture_.getBase64SkpData()); | 458 var rawData = tr.b.Base64.atob(this.picture_.getBase64SkpData()); |
| 459 this.saveFile_(this.skpFilename_.value, rawData); | 459 this.saveFile_(this.skpFilename_.value, rawData); |
| 460 } | 460 } |
| 461 }; | 461 }; |
| 462 | 462 |
| 463 return { | 463 return { |
| 464 DisplayItemDebugger: DisplayItemDebugger | 464 DisplayItemDebugger: DisplayItemDebugger |
| 465 }; | 465 }; |
| 466 }); | 466 }); |
| 467 </script> | 467 </script> |
| OLD | NEW |