summaryrefslogtreecommitdiffstats
path: root/chrome/browser/resources/net_internals/kernelextensionsview.js
blob: 22eadca43f3f3fef15575f693053fc3ca1fce0c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

/**
 * This view displays information on loaded Mac kernel extensions.
 *
 * Displays the output from running kexstat.
 *
 * @constructor
 */
function KernelExtensionsView(tabId, mainBoxId, textPReId) {
  DivView.call(this, mainBoxId);

  var tab = document.getElementById(tabId);
  setNodeDisplay(tab, true);
  this.textPre_ = document.getElementById(textPReId);

  g_browser.addKernelExtensionsObserver(this);
}

inherits(KernelExtensionsView, DivView);

KernelExtensionsView.prototype.onKernelExtensionsChanged =
function(kernelExtensionsText) {
  this.textPre_.innerHTML = '';
  if (kernelExtensionsText == null) {
    addTextNode(this.textPre_, 'No data');
  } else {
    addTextNode(this.textPre_, kernelExtensionsText);
  }
};