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

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

Issue 8511046: deprecate webui.css (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: undo mistake in downloads Created 9 years, 1 month 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 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 <include src="gpu_internals/browser_bridge.js"/>
6 <include src="gpu_internals/info_view.js"/>
7
8 var browserBridge;
9
10 /**
11 * Main entry point. called once the page has loaded.
12 */
13 function onLoad() {
14 browserBridge = new gpu.BrowserBridge();
15
16 // Create the views.
17 cr.ui.decorate('#info-view', gpu.InfoView);
18
19 // Create the main tab control
20 var tabs = $('main-tabs');
21 cr.ui.decorate(tabs, cr.ui.TabBox);
22
23 // Sync the main-tabs selectedTabs in-sync with the location.
24 tabs.addEventListener('selectedChange', function() {
25 if (tabs.selectedTab.id) {
26 history.pushState('', '', '#' + tabs.selectedTab.id);
27 }
28 });
29 window.onhashchange = function() {
30 var cur = window.location.hash;
31 if (cur == '#' || cur == '') {
32 tabs.selectedTab = $('info-view');
33 } else {
34 var tab = $(window.location.hash.substr(1));
35 if (tab)
36 tabs.selectedTab = tab;
37 }
38 };
39 window.onhashchange();
40 }
41
42 document.addEventListener('DOMContentLoaded', onLoad);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698