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

content / browser / resources / media / media_internals.js [blame]

// Copyright 2013 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'chrome://resources/cr_elements/cr_tab_box/cr_tab_box.js';

import {ClientRenderer} from './client_renderer.js';
import {initialize} from './main.js';
import {Manager} from './manager.js';

initialize(new Manager(new ClientRenderer()));
const tabBox = document.querySelector('cr-tab-box');
tabBox.hidden = false;

const _TabIndicies = {
  '#players': 0,
  '#audio': 1,
  '#video-capture': 2,
  '#audio-focus': 3,
  '#cdms': 4,
};

const tabHash = window.location.hash.toLowerCase();
if (tabHash in _TabIndicies) {
  tabBox.setAttribute('selected-index', _TabIndicies[tabHash]);
}