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

Side by Side Diff: chrome/browser/resources/net_internals/sdch_view.js

Issue 423813002: Sdch view for net-internals (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adopt logging for URLReqest-based dict fetcher + cosmetics Created 6 years, 3 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
OLDNEW
(Empty)
1 // Copyright (c) 2014 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 information related to SDCH.
7 *
8 * Shows loaded dictionaries, blacklisted domains and SDCH errors.
9 */
10 var SdchView = (function() {
11 'use strict';
12
13 // We inherit from DivView.
14 var superClass = DivView;
15
16 /**
17 * @constructor
18 */
19 function SdchView() {
20 assertFirstConstructorCall(SdchView);
21
22 // Call superclass's constructor.
23 superClass.call(this, SdchView.MAIN_BOX_ID);
24
25 // Register to receive changes to the SDCH info.
26 g_browser.addSdchInfoObserver(this, false);
27 }
28
29 SdchView.TAB_ID = 'tab-handle-sdch';
30 SdchView.TAB_NAME = 'SDCH';
31 SdchView.TAB_HASH = '#sdch';
32
33 // IDs for special HTML elements in sdch_view.html
34 SdchView.MAIN_BOX_ID = 'sdch-view-tab-content';
35
36 cr.addSingletonGetter(SdchView);
37
38 SdchView.prototype = {
39 // Inherit the superclass's methods.
40 __proto__: superClass.prototype,
41
42 onLoadLogFinish: function(data) {
43 return this.onSdchInfoChanged(data.sdchInfo);
44 },
45
46 onSdchInfoChanged: function(sdchInfo) {
47 if (!sdchInfo)
48 return false;
49 var input = new JsEvalContext(sdchInfo);
50 jstProcess(input, $(SdchView.MAIN_BOX_ID));
51 return true;
52 },
53 };
54
55 return SdchView;
56 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698