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

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 <style>
12 * {
13 -webkit-box-sizing: border-box;
arv (Not doing code reviews) 2010/12/08 17:55:19 box-sizing: border-box;
nduca 2010/12/08 19:08:22 Done.
14 }
15 body {
16 font-family: sans-serif;
17 }
18 </style>
19 <link rel="stylesheet" href="gpu_internals/info_view.css">
20 <script src="chrome://resources/js/cr.js"></script>
21 <script src="net_internals/util.js"></script>
22 <script src="net_internals/view.js"></script>
23 <script src="net_internals/tabswitcherview.js"></script>
24 <script src="gpu_internals/util.js"></script>
25 <script src="gpu_internals/browser_bridge.js"></script>
26 <script src="gpu_internals/info_view.js"></script>
27
28
29 <script>
30 var browser = null;
31
32 /**
33 * Main entry point. called once the page has loaded.
34 */
35 function onLoad() {
36 browserBridge = new gpu.BrowserBridge();
37
38 // Create a view which will display general information
39 // about the gpu.
40 var infoView = new gpu.InfoView('info-view');
41
42 // Create a view which lets you tab between the different sub-views.
43 var categoryTabSwitcher =
44 new TabSwitcherView('category-tab-handles');
45
46 // Populate the main tabs.
47 categoryTabSwitcher.addTab('info-tab', infoView, false);
48
49 // Build a map from the anchor name of each tab handle to its 'tab ID'.
50 // We will consider navigations to the #hash as a switch tab request.
51 var anchorMap = {};
52 var tabIds = categoryTabSwitcher.getAllTabIds();
53 for (var i = 0; i < tabIds.length; i++) {
54 var aNode = document.getElementById(tabIds[i]);
55 anchorMap[aNode.hash] = tabIds[i];
56 }
57 // Default the empty hash to the info tab.
58 anchorMap['#'] = anchorMap[''] = 'info-tab';
59
60 window.onhashchange = function() {
61 var tabId = anchorMap[window.location.hash];
62 if (tabId)
63 categoryTabSwitcher.switchToTab(tabId);
64 };
65
66 // Make this category tab widget the primary view, that fills the whole page.
67 var windowView = new WindowView(categoryTabSwitcher);
68
69 // Trigger initial layout.
70 windowView.resetGeometry();
71
72 // Select the initial view based on the current URL.
73 window.onhashchange();
74 }
75
76 document.addEventListener('DOMContentLoaded', onLoad);
77
78 </script>
79 </head>
80 <body>
81
82 <!-- Tab switcher for main categories. -->
83 <div id=category-tab-handles>
84 <ul>
85 <li><a href="#info" id="info-tab">GPU Info</a></li>
86 </ul>
87 </div>
88
89 <!-- Tabs -->
90 <include src="gpu_internals/info_view.html">
91 </body>
92 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698