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

Unified Diff: chrome/browser/resources/gpu_internals.js

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/gpu_internals.html ('k') | chrome/browser/ui/webui/gpu_internals_ui.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/gpu_internals.js
===================================================================
--- chrome/browser/resources/gpu_internals.js (revision 0)
+++ chrome/browser/resources/gpu_internals.js (revision 0)
@@ -0,0 +1,58 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+<include src="gpu_internals/overlay.js"/>
+<include src="gpu_internals/browser_bridge.js"/>
+<include src="gpu_internals/tracing_controller.js"/>
+<include src="gpu_internals/info_view.js"/>
+<include src="gpu_internals/timeline_model.js"/>
+<include src="gpu_internals/sorted_array_utils.js"/>
+<include src="gpu_internals/timeline.js"/>
+<include src="gpu_internals/timeline_track.js"/>
+<include src="gpu_internals/fast_rect_renderer.js"/>
+<include src="gpu_internals/profiling_view.js"/>
+<include src="gpu_internals/timeline_view.js"/>
+
+var browserBridge;
+var tracingController;
+var timelineView; // made global for debugging purposes only
+var profilingView; // made global for debugging purposes only
+
+/**
+ * Main entry point. called once the page has loaded.
+ */
+function onLoad() {
+ browserBridge = new gpu.BrowserBridge();
+ tracingController = new gpu.TracingController();
+
+ // Create the views.
+ cr.ui.decorate('#info-view', gpu.InfoView);
+
+ profilingView = $('profiling-view');
+ cr.ui.decorate(profilingView, gpu.ProfilingView);
+
+ // Create the main tab control
+ var tabs = $('main-tabs');
+ cr.ui.decorate(tabs, cr.ui.TabBox);
+
+ // Sync the main-tabs selectedTabs in-sync with the location.
+ tabs.addEventListener('selectedChange', function() {
+ if (tabs.selectedTab.id) {
+ history.pushState('', '', '#' + tabs.selectedTab.id);
+ }
+ });
+ window.onhashchange = function() {
+ var cur = window.location.hash;
+ if (cur == '#' || cur == '') {
+ tabs.selectedTab = $('info-view');
+ } else {
+ var tab = $(window.location.hash.substr(1));
+ if (tab)
+ tabs.selectedTab = tab;
+ }
+ };
+ window.onhashchange();
+}
+
+document.addEventListener('DOMContentLoaded', onLoad);
Property changes on: chrome/browser/resources/gpu_internals.js
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « chrome/browser/resources/gpu_internals.html ('k') | chrome/browser/ui/webui/gpu_internals_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698