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

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

Issue 7411004: Apply content-security-policy to chrome://gpu-internals. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 months 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
« no previous file with comments | « chrome/browser/browser_resources.grd ('k') | chrome/browser/resources/gpu_internals.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <include src="content_security_policy.html"/>
10
9 <link rel="stylesheet" href="webui.css"> 11 <link rel="stylesheet" href="webui.css">
10 <style> 12 <style>
11 * { 13 * {
12 box-sizing: border-box; 14 box-sizing: border-box;
13 -webkit-user-select: none; 15 -webkit-user-select: none;
14 } 16 }
15 17
16 html, body, #main-tabs { 18 html, body, #main-tabs {
17 height: 100%; 19 height: 100%;
18 } 20 }
(...skipping 24 matching lines...) Expand all
43 <link rel="stylesheet" href="gpu_internals/timeline_view.css"> 45 <link rel="stylesheet" href="gpu_internals/timeline_view.css">
44 <link rel="stylesheet" href="gpu_internals/timeline.css"> 46 <link rel="stylesheet" href="gpu_internals/timeline.css">
45 <link rel="stylesheet" href="gpu_internals/tracing_controller.css"> 47 <link rel="stylesheet" href="gpu_internals/tracing_controller.css">
46 <link rel="stylesheet" href="chrome://resources/css/tabs.css"> 48 <link rel="stylesheet" href="chrome://resources/css/tabs.css">
47 <script src="chrome://resources/js/cr.js"></script> 49 <script src="chrome://resources/js/cr.js"></script>
48 <script src="chrome://resources/js/cr/event_target.js"></script> 50 <script src="chrome://resources/js/cr/event_target.js"></script>
49 <script src="chrome://resources/js/cr/ui.js"></script> 51 <script src="chrome://resources/js/cr/ui.js"></script>
50 <script src="chrome://resources/js/cr/ui/focus_outline_manager.js"></script> 52 <script src="chrome://resources/js/cr/ui/focus_outline_manager.js"></script>
51 <script src="chrome://resources/js/cr/ui/tabs.js"></script> 53 <script src="chrome://resources/js/cr/ui/tabs.js"></script>
52 <script src="chrome://resources/js/util.js"></script> 54 <script src="chrome://resources/js/util.js"></script>
53 <script src="gpu_internals/overlay.js"></script> 55 <script src="chrome://gpu-internals/gpu_internals.js"></script>
54 <script src="gpu_internals/browser_bridge.js"></script> 56 <script src="chrome://gpu-internals/strings.js"></script>
55 <script src="gpu_internals/tracing_controller.js"></script>
56 <script src="gpu_internals/info_view.js"></script>
57 <script src="gpu_internals/timeline_model.js"></script>
58 <script src="gpu_internals/sorted_array_utils.js"></script>
59 <script src="gpu_internals/timeline.js"></script>
60 <script src="gpu_internals/timeline_track.js"></script>
61 <script src="gpu_internals/fast_rect_renderer.js"></script>
62 <script src="gpu_internals/profiling_view.js"></script>
63 <script src="gpu_internals/timeline_view.js"></script>
64
65 <script>
66 var browserBridge;
67 var tracingController;
68 var timelineView; // made global for debugging purposes only
69 var profilingView; // made global for debugging purposes only
70
71 /**
72 * Main entry point. called once the page has loaded.
73 */
74 function onLoad() {
75 browserBridge = new gpu.BrowserBridge();
76 tracingController = new gpu.TracingController();
77
78 // Create the views.
79 cr.ui.decorate('#info-view', gpu.InfoView);
80
81 profilingView = $('profiling-view');
82 cr.ui.decorate(profilingView, gpu.ProfilingView);
83
84 // Create the main tab control
85 var tabs = $('main-tabs');
86 cr.ui.decorate(tabs, cr.ui.TabBox);
87
88 // Sync the main-tabs selectedTabs in-sync with the location.
89 tabs.addEventListener('selectedChange', function() {
90 if (tabs.selectedTab.id) {
91 history.pushState('', '', '#' + tabs.selectedTab.id);
92 }
93 });
94 window.onhashchange = function() {
95 var cur = window.location.hash;
96 if (cur == '#' || cur == '') {
97 tabs.selectedTab = $('info-view');
98 } else {
99 var tab = $(window.location.hash.substr(1));
100 if (tab)
101 tabs.selectedTab = tab;
102 }
103 };
104 window.onhashchange();
105 }
106
107 document.addEventListener('DOMContentLoaded', onLoad);
108
109 </script>
110 </head> 57 </head>
111 <body> 58 <body>
112 <div id="debug-div"> 59 <div id="debug-div">
113 </div> 60 </div>
114 <!-- Tabs --> 61 <!-- Tabs -->
115 <tabbox id="main-tabs"> 62 <tabbox id="main-tabs">
116 <tabs> 63 <tabs>
117 <tab>GPU Info</tab> 64 <tab>GPU Info</tab>
118 <tab>Profiling</tab> 65 <tab>Profiling</tab>
119 </tabs> 66 </tabs>
120 <tabpanels> 67 <tabpanels>
121 <include src="gpu_internals/info_view.html"> 68 <include src="gpu_internals/info_view.html">
122 <tabpanel id="profiling-view"</div> 69 <tabpanel id="profiling-view"</div>
123 </tabpanels> 70 </tabpanels>
124 </div> 71 </div>
72 <script src="chrome://resources/js/i18n_template.js"></script>
73 <script src="chrome://resources/js/i18n_process.js"></script>
74 <script src="chrome://resources/js/jstemplate_compiled.js"></script>
125 </body> 75 </body>
126 </html> 76 </html>
OLDNEW
« no previous file with comments | « chrome/browser/browser_resources.grd ('k') | chrome/browser/resources/gpu_internals.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698