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

Side by Side Diff: netlog_viewer/alt_svc_view.js

Issue 2162963002: [polymer] Merge of master into polymer10-migration (Closed) Base URL: git@github.com:catapult-project/catapult.git@polymer10-migration
Patch Set: Merge polymer10-migration int polymer10-merge Created 4 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
« no previous file with comments | « netlog_viewer/alt_svc_view.html ('k') | netlog_viewer/assert.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 /**
6 * This view displays the Alt-Svc mappings.
7 */
8 var AltSvcView = (function() {
9 'use strict';
10
11 // We inherit from DivView.
12 var superClass = DivView;
13
14 /**
15 * @constructor
16 */
17 function AltSvcView() {
18 assertFirstConstructorCall(AltSvcView);
19
20 // Call superclass's constructor.
21 superClass.call(this, AltSvcView.MAIN_BOX_ID);
22
23 g_browser.addAltSvcMappingsObserver(this, true);
24 }
25
26 AltSvcView.TAB_ID = 'tab-handle-alt-svc';
27 AltSvcView.TAB_NAME = 'Alt-Svc';
28 AltSvcView.TAB_HASH = '#alt-svc';
29
30 // IDs for special HTML elements in alt_svc_view.html
31 AltSvcView.MAIN_BOX_ID = 'alt-svc-view-tab-content';
32 AltSvcView.ALTERNATE_PROTOCOL_MAPPINGS_ID =
33 'alt-svc-view-alternate-protocol-mappings';
34
35 cr.addSingletonGetter(AltSvcView);
36
37 AltSvcView.prototype = {
38 // Inherit the superclass's methods.
39 __proto__: superClass.prototype,
40
41 onLoadLogFinish: function(data) {
42 // TODO(rch): Remove the check for spdyAlternateProtocolMappings after
43 // M53 (It was renamed to altSvcMappings in M50).
44 return this.onAltSvcMappingsChanged(data.altSvcMappings ||
45 data.spdyAlternateProtocolMappings);
46 },
47
48 /**
49 * Displays the alternate service mappings.
50 */
51 onAltSvcMappingsChanged: function(altSvcMappings) {
52 if (!altSvcMappings)
53 return false;
54 // TODO(rayraymond): Update DOM without use of jstemplate.
55 // var input = new JsEvalContext({altSvcMappings: altSvcMappings});
56 // jstProcess(input, $(AltSvcView.ALTERNATE_PROTOCOL_MAPPINGS_ID));
57 return true;
58 }
59 };
60
61 return AltSvcView;
62 })();
OLDNEW
« no previous file with comments | « netlog_viewer/alt_svc_view.html ('k') | netlog_viewer/assert.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698