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

Side by Side Diff: tracing/tracing/ui/extras/chrome/cc/raster_task_selection.html

Issue 2955043002: Remove tr.b.asArray. (Closed)
Patch Set: Created 3 years, 5 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <!-- 2 <!--
3 Copyright (c) 2013 The Chromium Authors. All rights reserved. 3 Copyright (c) 2013 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/base.html"> 8 <link rel="import" href="/tracing/base/base.html">
9 <link rel="import" href="/tracing/extras/chrome/cc/raster_task.html"> 9 <link rel="import" href="/tracing/extras/chrome/cc/raster_task.html">
10 <link rel="import" href="/tracing/model/event_set.html"> 10 <link rel="import" href="/tracing/model/event_set.html">
11 <link rel="import" href="/tracing/ui/analysis/single_event_sub_view.html"> 11 <link rel="import" href="/tracing/ui/analysis/single_event_sub_view.html">
12 <link rel="import" href="/tracing/ui/extras/chrome/cc/raster_task_view.html"> 12 <link rel="import" href="/tracing/ui/extras/chrome/cc/raster_task_view.html">
13 <link rel="import" href="/tracing/ui/extras/chrome/cc/selection.html"> 13 <link rel="import" href="/tracing/ui/extras/chrome/cc/selection.html">
14 14
15 <script> 15 <script>
16 'use strict'; 16 'use strict';
17 17
18 tr.exportTo('tr.ui.e.chrome.cc', function() { 18 tr.exportTo('tr.ui.e.chrome.cc', function() {
19 /** 19 /**
20 * @constructor 20 * @constructor
21 */ 21 */
22 function RasterTaskSelection(selection) { 22 function RasterTaskSelection(selection) {
23 tr.ui.e.chrome.cc.Selection.call(this); 23 tr.ui.e.chrome.cc.Selection.call(this);
24 const whySupported = RasterTaskSelection.whySuported(selection); 24 const whySupported = RasterTaskSelection.whySuported(selection);
25 if (!whySupported.ok) { 25 if (!whySupported.ok) {
26 throw new Error('Fail: ' + whySupported.why); 26 throw new Error('Fail: ' + whySupported.why);
27 } 27 }
28 this.slices_ = tr.b.asArray(selection); 28 this.slices_ = Array.from(selection);
29 this.tiles_ = this.slices_.map(function(slice) { 29 this.tiles_ = this.slices_.map(function(slice) {
30 const tile = tr.e.cc.getTileFromRasterTaskSlice(slice); 30 const tile = tr.e.cc.getTileFromRasterTaskSlice(slice);
31 if (tile === undefined) { 31 if (tile === undefined) {
32 throw new Error('This should never happen due to .supports check.'); 32 throw new Error('This should never happen due to .supports check.');
33 } 33 }
34 return tile; 34 return tile;
35 }); 35 });
36 } 36 }
37 37
38 RasterTaskSelection.whySuported = function(selection) { 38 RasterTaskSelection.whySuported = function(selection) {
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 get containingSnapshot() { 131 get containingSnapshot() {
132 return this.tiles_[0].containingSnapshot; 132 return this.tiles_[0].containingSnapshot;
133 } 133 }
134 }; 134 };
135 135
136 return { 136 return {
137 RasterTaskSelection, 137 RasterTaskSelection,
138 }; 138 };
139 }); 139 });
140 </script> 140 </script>
OLDNEW
« no previous file with comments | « tracing/tracing/ui/analysis/multi_object_sub_view.html ('k') | tracing/tracing/ui/find_controller_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698