diff options
author | eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-29 20:49:24 +0000 |
---|---|---|
committer | eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-29 20:49:24 +0000 |
commit | 203862d485d48bf1d2b0427ee7d754406c247e6e (patch) | |
tree | b060a63150eb710836b21d10dd5d7d035c1a2639 | |
parent | 433f2cff24eee2c4bcd4392c72e912ccc949687b (diff) | |
download | chromium_src-203862d485d48bf1d2b0427ee7d754406c247e6e.zip chromium_src-203862d485d48bf1d2b0427ee7d754406c247e6e.tar.gz chromium_src-203862d485d48bf1d2b0427ee7d754406c247e6e.tar.bz2 |
Rename more IDs on about:net-internals to use hyphens and prefix with view name.
BUG=90857
Review URL: http://codereview.chromium.org/7453026
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94748 0039d316-1c4b-4281-b951-d872f2087c98
8 files changed, 72 insertions, 64 deletions
diff --git a/chrome/browser/resources/net_internals/category_tabs.html b/chrome/browser/resources/net_internals/category_tabs.html index a52d2af..32a0e8f 100644 --- a/chrome/browser/resources/net_internals/category_tabs.html +++ b/chrome/browser/resources/net_internals/category_tabs.html @@ -1,24 +1,24 @@ <!-- Tab switcher for main categories. --> -<div id=categoryTabHandles class="tab-switcher-view"> - <a href="#capture" id=captureTab>Capture</a> - <a href="#export" id=exportTab>Export</a> - <a href="#import" id=importTab>Import</a> - <a href="#proxy" id=proxyTab>Proxy</a> - <a href="#events" id=eventsTab>Events</a> - <a href="#dns" id=dnsTab>DNS</a> - <a href="#sockets" id=socketsTab>Sockets</a> - <a href="#spdy" id=spdyTab>SPDY</a> - <a href="#httpCache" id=httpCacheTab>HTTP Cache</a> - <a href="#httpThrottling" id=httpThrottlingTab>HTTP Throttling</a> +<div id=category-tab-handles class="tab-switcher-view"> + <a href="#capture" id=tab-handle-capture>Capture</a> + <a href="#export" id=tab-handle-export>Export</a> + <a href="#import" id=tab-handle-import>Import</a> + <a href="#proxy" id=tab-handle-proxy>Proxy</a> + <a href="#events" id=tab-handle-events>Events</a> + <a href="#dns" id=tab-handle-dns>DNS</a> + <a href="#sockets" id=tab-handle-sockets>Sockets</a> + <a href="#spdy" id=tab-handle-spdy>SPDY</a> + <a href="#httpCache" id=tab-handle-http-cache>HTTP Cache</a> + <a href="#httpThrottling" id=tab-handle-http-throttling>HTTP Throttling</a> <!-- Tab is only shown on Windows --> - <a href="#serviceProviders" id=serviceProvidersTab style="display: none;">SPIs</a> - <a href="#tests" id=testTab>Tests</a> - <a href="#hsts" id=hstsTab>HSTS</a> + <a href="#serviceProviders" id=tab-handle-service-providers style="display: none;">SPIs</a> + <a href="#tests" id=tab-handle-tests>Tests</a> + <a href="#hsts" id=tab-handle-hsts>HSTS</a> <!-- Tab is only shown on ChromeOS --> - <a href="#logs" id=logsTab style="display: none;">Logs</a> - <a href="#prerender" id=prerenderTab>Prerender</a> + <a href="#logs" id=tab-handle-hsts style="display: none;">Logs</a> + <a href="#prerender" id=tab-handle-prerender>Prerender</a> </div> <!-- Splitter Box: This is a handle to resize the vertical divider --> -<div id=splitterBoxForMainTabs class=vertical-splitter></div> +<div id=splitter-box-for-main-tabs class=vertical-splitter></div> diff --git a/chrome/browser/resources/net_internals/logs_view.html b/chrome/browser/resources/net_internals/logs_view.html index af8d7f3..ddfb6d6 100644 --- a/chrome/browser/resources/net_internals/logs_view.html +++ b/chrome/browser/resources/net_internals/logs_view.html @@ -2,9 +2,9 @@ <div id=logs-view-tab-content style="display: none;"> <h4>Network Log Data</h4> - <button id=logsGlobalShowBtn class=logs-view-global-button>Show all...</button> - <button id=logsGlobalHideBtn class=logs-view-global-button>Hide all...</button> - <button id=logsRefreshBtn class=logs-view-global-button>Refresh logs...</button> + <button id=logs-view-global-show-btn class=logs-view-global-button>Show all...</button> + <button id=logs-view-global-hide-btn class=logs-view-global-button>Hide all...</button> + <button id=logs-view-refresh-btn class=logs-view-global-button>Refresh logs...</button> <div style="clear: both"></div> <table width=100% class=styledTable> <thead> diff --git a/chrome/browser/resources/net_internals/logs_view.js b/chrome/browser/resources/net_internals/logs_view.js index 011c417..facb40eb 100644 --- a/chrome/browser/resources/net_internals/logs_view.js +++ b/chrome/browser/resources/net_internals/logs_view.js @@ -12,9 +12,9 @@ function LogsView() { const mainBoxId = 'logs-view-tab-content'; const tableId = 'logs-view-log-table'; - const globalShowButtonId = 'logsGlobalShowBtn'; - const globalHideButtonId = 'logsGlobalHideBtn'; - const refreshLogsButtonId = 'logsRefreshBtn'; + const globalShowButtonId = 'logs-view-global-show-btn'; + const globalHideButtonId = 'logs-view-global-hide-btn'; + const refreshLogsButtonId = 'logs-view-refresh-btn'; var tableDiv = $(tableId); this.rows = []; diff --git a/chrome/browser/resources/net_internals/main.css b/chrome/browser/resources/net_internals/main.css index f4175f6..23e9013 100644 --- a/chrome/browser/resources/net_internals/main.css +++ b/chrome/browser/resources/net_internals/main.css @@ -52,7 +52,7 @@ body { #export-view-tab-content, #dns-view-tab-content, #sockets-view-tab-content, -#spdyTabContent, +#spdy-view-tab-content, #service-providers-view-tab-content, #test-view-tab-content, #hsts-view-tab-content, diff --git a/chrome/browser/resources/net_internals/main.js b/chrome/browser/resources/net_internals/main.js index e1bd0eb..d1f78e8 100644 --- a/chrome/browser/resources/net_internals/main.js +++ b/chrome/browser/resources/net_internals/main.js @@ -58,9 +58,9 @@ onLoaded = function() { // This view is a left (resizable) navigation bar. categoryTabSwitcher = new TabSwitcherView(); var tabSwitcherSplitView = new ResizableVerticalSplitView( - new DivView('categoryTabHandles'), + new DivView('category-tab-handles'), categoryTabSwitcher, - new DivView('splitterBoxForMainTabs')); + new DivView('splitter-box-for-main-tabs')); // By default the split for the left navbar will be at 50% of the entire // width. This is not aesthetically pleasing, so we will shrink it. @@ -71,24 +71,31 @@ onLoaded = function() { // Populate the main tabs. Even tabs that don't contain information for the // running OS should be created, so they can load log dumps from other // OSes. - categoryTabSwitcher.addTab('eventsTab', new EventsView(), false, true); - categoryTabSwitcher.addTab('proxyTab', new ProxyView(), false, true); - categoryTabSwitcher.addTab('dnsTab', new DnsView(), false, true); - categoryTabSwitcher.addTab('socketsTab', new SocketsView(), false, true); - categoryTabSwitcher.addTab('spdyTab', new SpdyView(), false, true); - categoryTabSwitcher.addTab('httpCacheTab', new HttpCacheView(), false, true); - categoryTabSwitcher.addTab('importTab', new ImportView(), false, true); - categoryTabSwitcher.addTab('exportTab', new ExportView(), false, true); - categoryTabSwitcher.addTab('captureTab', new CaptureView(), false, true); - categoryTabSwitcher.addTab('serviceProvidersTab', new ServiceProvidersView(), - false, cr.isWindows); - categoryTabSwitcher.addTab('testTab', new TestView(), false, true); - categoryTabSwitcher.addTab('hstsTab', new HSTSView(), false, true); - categoryTabSwitcher.addTab('httpThrottlingTab', new HttpThrottlingView(), + categoryTabSwitcher.addTab('tab-handle-events', new EventsView(), false, true); - categoryTabSwitcher.addTab('logsTab', new LogsView(), false, + categoryTabSwitcher.addTab('tab-handle-proxy', new ProxyView(), false, true); + categoryTabSwitcher.addTab('tab-handle-dns', new DnsView(), false, true); + categoryTabSwitcher.addTab('tab-handle-sockets', new SocketsView(), + false, true); + categoryTabSwitcher.addTab('tab-handle-spdy', new SpdyView(), false, true); + categoryTabSwitcher.addTab('tab-handle-http-cache', new HttpCacheView(), + false, true); + categoryTabSwitcher.addTab('tab-handle-import', new ImportView(), + false, true); + categoryTabSwitcher.addTab('tab-handle-export', new ExportView(), + false, true); + categoryTabSwitcher.addTab('tab-handle-capture', new CaptureView(), + false, true); + categoryTabSwitcher.addTab('tab-handle-service-providers', + new ServiceProvidersView(), false, cr.isWindows); + categoryTabSwitcher.addTab('tab-handle-tests', new TestView(), false, true); + categoryTabSwitcher.addTab('tab-handle-hsts', new HSTSView(), false, true); + categoryTabSwitcher.addTab('tab-handle-http-throttling', + new HttpThrottlingView(), false, true); + categoryTabSwitcher.addTab('tab-handle-hsts', new LogsView(), false, cr.isChromeOS); - categoryTabSwitcher.addTab('prerenderTab', new PrerenderView(), false, true); + categoryTabSwitcher.addTab('tab-handle-prerender', new PrerenderView(), + false, true); // Build a map from the anchor name of each tab handle to its "tab ID". // We will consider navigations to the #hash as a switch tab request. @@ -99,7 +106,7 @@ onLoaded = function() { anchorMap[aNode.hash] = tabIds[i]; } // Default the empty hash to the data tab. - anchorMap['#'] = anchorMap[''] = 'exportTab'; + anchorMap['#'] = anchorMap[''] = 'tab-handle-export'; window.onhashchange = onUrlHashChange.bind(null, anchorMap); diff --git a/chrome/browser/resources/net_internals/service_providers_view.js b/chrome/browser/resources/net_internals/service_providers_view.js index a498cba..1701832 100644 --- a/chrome/browser/resources/net_internals/service_providers_view.js +++ b/chrome/browser/resources/net_internals/service_providers_view.js @@ -13,7 +13,7 @@ * @constructor */ function ServiceProvidersView() { - const tabId = 'serviceProvidersTab'; + const tabId = 'tab-handle-service-providers'; const mainBoxId = 'service-providers-view-tab-content'; const serviceProvidersTbodyId = 'service-providers-view-tbody'; const namespaceProvidersTbodyId = diff --git a/chrome/browser/resources/net_internals/spdy_view.html b/chrome/browser/resources/net_internals/spdy_view.html index 4eb62e3..57d3553 100644 --- a/chrome/browser/resources/net_internals/spdy_view.html +++ b/chrome/browser/resources/net_internals/spdy_view.html @@ -1,26 +1,26 @@ -<div id=spdyTabContent> +<div id=spdy-view-tab-content> <h4>SPDY Status</h4> <ul> - <li>SPDY Enabled: <span id=spdyEnabledSpan>????</span></li> - <li>Use Alternate Protocol: <span id=spdyUseAlternateProtocolSpan>????</span></li> - <li>Force SPDY Always: <span id=spdyForceAlwaysSpan>????</span></li> - <li>Force SPDY Over SSL: <span id=spdyForceOverSslSpan>????</span></li> - <li>Next Protocols: <span id=spdyNextProtocolsSpan>????</span></li> + <li>SPDY Enabled: <span id=spdy-view-enabled-span>????</span></li> + <li>Use Alternate Protocol: <span id=spdy-view-alternate-protocol-span>????</span></li> + <li>Force SPDY Always: <span id=spdy-view-force-always-span>????</span></li> + <li>Force SPDY Over SSL: <span id=spdy-view-force-over-ssl-span>????</span></li> + <li>Next Protocols: <span id=spdy-view-next-protocols-span>????</span></li> </ul> <h4>SPDY sessions</h4> <!-- Only one of these two are shown --> - <span id=spdySessionNoneSpan>None</span> - <span id=spdySessionLinkSpan style="display: none;"> + <span id=spdy-view-session-none-span>None</span> + <span id=spdy-view-session-link-span style="display: none;"> <a href='#events&q=type:SPDY_SESSION%20is:active'>View live SPDY sessions</a> </span> <p> - <div id=spdySessionDiv> + <div id=spdy-view-session-div> </div> </p> <h4>Alternate Protocol Mappings</h4> <p /> - <div id=spdyAlternateProtocolMappingsDiv> + <div id=spdy-view-alternate-protocol-mappings-div> </div> </div> diff --git a/chrome/browser/resources/net_internals/spdy_view.js b/chrome/browser/resources/net_internals/spdy_view.js index f142082..095680f 100644 --- a/chrome/browser/resources/net_internals/spdy_view.js +++ b/chrome/browser/resources/net_internals/spdy_view.js @@ -9,16 +9,17 @@ * @constructor */ function SpdyView() { - const mainBoxId = 'spdyTabContent'; - const spdyEnabledSpanId = 'spdyEnabledSpan'; - const spdyUseAlternateProtocolSpanId = 'spdyUseAlternateProtocolSpan'; - const spdyForceAlwaysSpanId = 'spdyForceAlwaysSpan'; - const spdyForceOverSslSpanId = 'spdyForceOverSslSpan'; - const spdyNextProtocolsSpanId = 'spdyNextProtocolsSpan'; - const spdyAlternateProtocolMappingsDivId = 'spdyAlternateProtocolMappingsDiv'; - const spdySessionNoneSpanId = 'spdySessionNoneSpan'; - const spdySessionLinkSpanId = 'spdySessionLinkSpan'; - const spdySessionDivId = 'spdySessionDiv'; + const mainBoxId = 'spdy-view-tab-content'; + const spdyEnabledSpanId = 'spdy-view-enabled-span'; + const spdyUseAlternateProtocolSpanId = 'spdy-view-alternate-protocol-span'; + const spdyForceAlwaysSpanId = 'spdy-view-force-always-span'; + const spdyForceOverSslSpanId = 'spdy-view-force-over-ssl-span'; + const spdyNextProtocolsSpanId = 'spdy-view-next-protocols-span'; + const spdyAlternateProtocolMappingsDivId = + 'spdy-view-alternate-protocol-mappings-div'; + const spdySessionNoneSpanId = 'spdy-view-session-none-span'; + const spdySessionLinkSpanId = 'spdy-view-session-link-span'; + const spdySessionDivId = 'spdy-view-session-div'; DivView.call(this, mainBoxId); g_browser.addSpdySessionInfoObserver(this); |