1 <!DOCTYPE HTML> 2 <html> 3 <!-- 4 Copyright (c) 2010 The Chromium Authors. All rights reserved. 5 Use of this source code is governed by a BSD-style license that can be 6 found in the LICENSE file. 7 --> 8 <head i18n-values="dir:textdirection;"> 9 <link rel="stylesheet" href="webui.css"> 10 <style> 11 * { 12 box-sizing: border-box; 13 } 14 15 html, body, #main-tabs { 16 height: 100%; 17 } 18 19 body { 20 cursor: default; 21 font-family: sans-serif; 22 padding: 0; 23 margin: 0; 24 } 25 26 #debug-div { 27 display: -webkit-box; 28 position: fixed; 29 top: 0px; 30 left: 50%; 31 border: 1px solid red; 32 } 33 34 </style> 35 <link rel="stylesheet" href="gpu_internals/info_view.css"> 36 <link rel="stylesheet" href="gpu_internals/overlay.css"> 37 <link rel="stylesheet" href="gpu_internals/profiling_view.css"> 38 <link rel="stylesheet" href="gpu_internals/tab_control.css"> 39 <link rel="stylesheet" href="gpu_internals/timeline_view.css"> 40 <link rel="stylesheet" href="gpu_internals/timeline.css"> 41 <link rel="stylesheet" href="gpu_internals/tracing_controller.css"> 42 <script src="chrome://resources/js/cr.js"></script> 43 <script src="chrome://resources/js/cr/event_target.js"></script> 44 <script src="chrome://resources/js/cr/ui.js"></script> 45 <script src="chrome://resources/js/util.js"></script> 46 <script src="gpu_internals/tab_control.js"></script> 47 <script src="gpu_internals/overlay.js"></script> 48 <script src="gpu_internals/browser_bridge.js"></script> 49 <script src="gpu_internals/tracing_controller.js"></script> 50 <script src="gpu_internals/info_view.js"></script> 51 <script src="gpu_internals/timeline_model.js"></script> 52 <script src="gpu_internals/sorted_array_utils.js"></script> 53 <script src="gpu_internals/timeline.js"></script> 54 <script src="gpu_internals/timeline_track.js"></script> 55 <script src="gpu_internals/fast_rect_renderer.js"></script> 56 <script src="gpu_internals/profiling_view.js"></script> 57 <script src="gpu_internals/timeline_view.js"></script> 58 59 <script> 60 var browserBridge; 61 var tracingController; 62 var timelineView; // made global for debugging purposes only 63 var profilingView; // made global for debugging purposes only 64 65 /** 66 * Main entry point. called once the page has loaded. 67 */ 68 function onLoad() { 69 browserBridge = new gpu.BrowserBridge(); 70 tracingController = new gpu.TracingController(); 71 72 // Create the views. 73 cr.ui.decorate('#info-view', gpu.InfoView); 74 75 profilingView = $('profiling-view'); 76 cr.ui.decorate(profilingView, gpu.ProfilingView); 77 78 // Create the main tab control 79 var tabs = $('main-tabs'); 80 cr.ui.decorate(tabs, gpu.TabControl); 81 82 // Sync the main-tabs selectedTabs in-sync with the location. 83 tabs.addEventListener('selectedTabChange', function() { 84 if (tabs.selectedTab.id) { 85 history.pushState('', '', '#' + tabs.selectedTab.id); 86 } 87 }); 88 window.onhashchange = function() { 89 var cur = window.location.hash; 90 if (cur == '#' || cur == '') { 91 if (tabs.tabs.length) 92 tabs.selectedTab = tabs.tabs[0]; 93 } else { 94 var tab = $(window.location.hash.substr(1)); 95 if (tab) 96 tabs.selectedTab = tab; 97 } 98 }; 99 window.onhashchange(); 100 } 101 102 document.addEventListener('DOMContentLoaded', onLoad); 103 104 </script> 105 </head> 106 <body> 107 <div id="debug-div"> 108 </div> 109 <!-- Tabs --> 110 <div id="main-tabs"> 111 <include src="gpu_internals/info_view.html"> 112 <div id="profiling-view" label="Profiling"></div> 113 </div> 114 </body> 115 </html> 116