1// Copyright (C) 2024 The Android Open Source Project 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15import { 16 CustomSqlDetailsPanelConfig, 17 CustomSqlTableDefConfig, 18 CustomSqlTableSliceTrack, 19} from '../../frontend/tracks/custom_sql_table_slice_track'; 20import {NamedSliceTrackTypes} from '../../frontend/named_slice_track'; 21import {ScreenshotTab} from './screenshot_panel'; 22 23export class ScreenshotsTrack extends CustomSqlTableSliceTrack<NamedSliceTrackTypes> { 24 static readonly kind = 'dev.perfetto.ScreenshotsTrack'; 25 26 getSqlDataSource(): CustomSqlTableDefConfig { 27 return { 28 sqlTableName: 'android_screenshots', 29 columns: ['*'], 30 }; 31 } 32 33 getDetailsPanel(): CustomSqlDetailsPanelConfig { 34 return { 35 kind: ScreenshotTab.kind, 36 config: { 37 sqlTableName: this.tableName, 38 title: 'Screenshots', 39 }, 40 }; 41 } 42} 43