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

Side by Side Diff: chrome/browser/resources/gpu_internals.html

Issue 5228004: Switch the about:gpu implementation from an about handler to dom_ui.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years 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 | Annotate | Revision Log
OLDNEW
(Empty)
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>
9 <link rel="stylesheet" href="dom_ui.css">
10 <link rel="stylesheet" href="net_internals/tabswitcherview.css">
11 <link rel="stylesheet" href="gpu_internals/info_view.css">
12 <script src="chrome://resources/js/cr.js"></script>
13 <script src="net_internals/util.js"></script>
14 <script src="net_internals/view.js"></script>
15 <script src="net_internals/tabswitcherview.js"></script>
16 <script src="gpu_internals/browser_bridge.js"></script>
17 <script src="gpu_internals/info_view.js"></script>
18
19 <script>
20 var g_browser = null;
arv (Not doing code reviews) 2010/12/03 22:19:20 var browser;
nduca 2010/12/03 22:49:39 Done.
21
22 /**
23 * Main entry point. called once the page has loaded.
24 */
25 function onLoaded() {
26 g_browser = new gpu.BrowserBridge();
27
28 // Create a view which will display general information
29 // about the gpu.
30 var infoView = new InfoView('info-tab-content');
31
32 // Create a view which lets you tab between the different sub-views.
33 var categoryTabSwitcher =
34 new TabSwitcherView('category-tab-handles');
35
36 // Populate the main tabs.
37 categoryTabSwitcher.addTab('info-tab', infoView, false);
38
39 // Build a map from the anchor name of each tab handle to its 'tab ID'.
40 // We will consider navigations to the #hash as a switch tab request.
41 var anchorMap = {};
42 var tabIds = categoryTabSwitcher.getAllTabIds();
43 for (var i = 0; i < tabIds.length; ++i) {
44 var aNode = document.getElementById(tabIds[i]);
45 anchorMap[aNode.hash] = tabIds[i];
46 }
47 // Default the empty hash to the info tab.
48 anchorMap['#'] = anchorMap[''] = 'info-tab';
49
50 window.onhashchange = function() {
51 var tabId = anchorMap[window.location.hash];
52 if (tabId)
53 categoryTabSwitcher.switchToTab(tabId);
54 };
55
56 // Make this category tab widget the primary view, that fills the whole page.
57 var windowView = new WindowView(categoryTabSwitcher);
58
59 // Trigger initial layout.
arv (Not doing code reviews) 2010/12/03 22:19:20 Would it be too much to get rid of all the js layo
nduca 2010/12/03 22:49:39 You mean, let css do the layout rather than all th
60 windowView.resetGeometry();
61
62 // Select the initial view based on the current URL.
63 window.onhashchange();
64 }
65 document.addEventListener('DOMContentLoaded', load);
66 </script>
67 </head>
68 <body onload="load()">
arv (Not doing code reviews) 2010/12/03 22:19:20 why DOMContentLoaded and window.onload?
nduca 2010/12/03 22:49:39 hahaha thanks! On 2010/12/03 22:19:20, arv wrote:
69
70 <!-- Tab switcher for main categories. -->
71 <div id=category-tab-handles><a href="#info" id=info-tab>GPU Info</a></li>
72 </ul>
arv (Not doing code reviews) 2010/12/03 22:19:20 Invalid markup. This looks like some old cruft
nduca 2010/12/03 22:49:39 Holy crap, I suck. On 2010/12/03 22:19:20, arv wro
73 </div>
74
75 <!-- Tabs -->
76 <div id=info-tab-content>
77 <div id=info-text></div>
78 </div>
79
80 </body>
81 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698