1/* 2 * Copyright (C) 2022 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16import {Component, Input} from '@angular/core'; 17import {TRACE_INFO} from 'app/trace_info'; 18import {PersistentStore} from 'common/persistent_store'; 19import {TraceType} from 'trace/trace_type'; 20import {UiData} from './ui_data'; 21 22@Component({ 23 selector: 'viewer-window-manager', 24 template: ` 25 <div class="card-grid"> 26 <rects-view 27 class="rects-view" 28 title="Windows" 29 [rects]="inputData?.rects ?? []" 30 [displayIds]="inputData?.displayIds ?? []" 31 [highlightedItems]="inputData?.highlightedItems ?? []"></rects-view> 32 <mat-divider [vertical]="true"></mat-divider> 33 <hierarchy-view 34 class="hierarchy-view" 35 [tree]="inputData?.tree ?? null" 36 [dependencies]="inputData?.dependencies ?? []" 37 [highlightedItems]="inputData?.highlightedItems ?? []" 38 [pinnedItems]="inputData?.pinnedItems ?? []" 39 [store]="store" 40 [userOptions]="inputData?.hierarchyUserOptions ?? {}"></hierarchy-view> 41 <mat-divider [vertical]="true"></mat-divider> 42 <properties-view 43 class="properties-view" 44 [userOptions]="inputData?.propertiesUserOptions ?? {}" 45 [propertiesTree]="inputData?.propertiesTree ?? {}" 46 [isProtoDump]="true"></properties-view> 47 </div> 48 `, 49 styles: [ 50 ` 51 .rects-view, 52 .hierarchy-view, 53 .properties-view { 54 flex: 1; 55 padding: 16px; 56 display: flex; 57 flex-direction: column; 58 overflow: auto; 59 } 60 `, 61 ], 62}) 63export class ViewerWindowManagerComponent { 64 @Input() inputData?: UiData; 65 @Input() store: PersistentStore = new PersistentStore(); 66 @Input() active = false; 67 TRACE_INFO = TRACE_INFO; 68 TraceType = TraceType; 69} 70