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