| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * Dictionary of constants (Initialized soon after loading by data from browser, | 6 * Dictionary of constants (Initialized soon after loading by data from browser, |
| 7 * updated on load log). The *Types dictionaries map strings to numeric IDs, | 7 * updated on load log). The *Types dictionaries map strings to numeric IDs, |
| 8 * while the *TypeNames are the other way around. | 8 * while the *TypeNames are the other way around. |
| 9 */ | 9 */ |
| 10 var EventType = null; | 10 var EventType = null; |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 addTab(QuicView); | 196 addTab(QuicView); |
| 197 addTab(SdchView); | 197 addTab(SdchView); |
| 198 addTab(HttpCacheView); | 198 addTab(HttpCacheView); |
| 199 addTab(ModulesView); | 199 addTab(ModulesView); |
| 200 addTab(TestView); | 200 addTab(TestView); |
| 201 addTab(HSTSView); | 201 addTab(HSTSView); |
| 202 addTab(BandwidthView); | 202 addTab(BandwidthView); |
| 203 addTab(PrerenderView); | 203 addTab(PrerenderView); |
| 204 addTab(CrosView); | 204 addTab(CrosView); |
| 205 | 205 |
| 206 // To prevent flickering, main-tab-contents initially has display = none. | |
| 207 $('main-tab-contents').style.display = ''; | |
| 208 this.tabSwitcher_.showMenuItem(CrosView.TAB_ID, cr.isChromeOS); | 206 this.tabSwitcher_.showMenuItem(CrosView.TAB_ID, cr.isChromeOS); |
| 209 }, | 207 }, |
| 210 | 208 |
| 211 /** | 209 /** |
| 212 * This function is called by the tab switcher when the current tab has been | 210 * This function is called by the tab switcher when the current tab has been |
| 213 * changed. It will update the current URL to reflect the new active tab, | 211 * changed. It will update the current URL to reflect the new active tab, |
| 214 * so the back can be used to return to previous view. | 212 * so the back can be used to return to previous view. |
| 215 */ | 213 */ |
| 216 onTabSwitched_: function(oldTabId, newTabId) { | 214 onTabSwitched_: function(oldTabId, newTabId) { |
| 217 // Update data needed by newly active tab, as it may be | 215 // Update data needed by newly active tab, as it may be |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 * Returns the name for sdchProblemCode. | 392 * Returns the name for sdchProblemCode. |
| 395 * | 393 * |
| 396 * Example: sdchProblemCodeToString(5) should return | 394 * Example: sdchProblemCodeToString(5) should return |
| 397 * "DECODE_BODY_ERROR". | 395 * "DECODE_BODY_ERROR". |
| 398 * @param {number} sdchProblemCode The SDCH problem code. | 396 * @param {number} sdchProblemCode The SDCH problem code. |
| 399 * @return {string} The name of the given problem code. | 397 * @return {string} The name of the given problem code. |
| 400 */ | 398 */ |
| 401 function sdchProblemCodeToString(sdchProblemCode) { | 399 function sdchProblemCodeToString(sdchProblemCode) { |
| 402 return getKeyWithValue(SdchProblemCode, sdchProblemCode); | 400 return getKeyWithValue(SdchProblemCode, sdchProblemCode); |
| 403 } | 401 } |
| OLD | NEW |