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

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 browser = null;
21
22 /**
23 * Main entry point. called once the page has loaded.
24 */
25 function onLoad() {
26 browser = new gpu.BrowserBridge();
27
28 // Create a view which will display general information
29 // about the gpu.
30 var infoView = new gpu.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) {
arv (Not doing code reviews) 2010/12/06 19:45:57 i++ for consistency
nduca 2010/12/07 01:03:40 Done.
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.
60 windowView.resetGeometry();
61
62 // Select the initial view based on the current URL.
63 window.onhashchange();
64 }
65
66 </script>
67 </head>
68 <body onload="onLoad()">
arv (Not doing code reviews) 2010/12/06 19:45:57 You should have kept DOMContentLoaded instead.
nduca 2010/12/07 01:03:40 /me is n00b. Thanks. On 2010/12/06 19:45:57, arv w
69
70 <!-- Tab switcher for main categories. -->
71 <div id=category-tab-handles>
72 <ul>
73 <li><a href="#info" id=info-tab>GPU Info</a></li>
74 </ul>
75 </div>
76
77 <!-- Tabs -->
78 <div id=info-tab-content>
79 <div id=info-text></div>
80 </div>
81
82 </body>
83 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698