Elim cr-checkbox
[chromium-blink-merge.git] / chrome / browser / resources / chromeos / slow.js
blob14a5e82cec529af0cb316bd5e97a50d637cf0687
1 // Copyright 2013 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.
5 cr.define('options', function() {
6 function Slow() {
8 cr.addSingletonGetter(Slow);
10 Slow.prototype = {
11 initialized_: false
14 Slow.initialize = function() {
15 $('slow-disable').addEventListener('click', function(event) {
16 Slow.disableTracing();
17 });
18 $('slow-enable').addEventListener('click', function(event) {
19 Slow.enableTracing();
20 });
21 this.initialized_ = true;
24 Slow.disableTracing = function() {
25 chrome.send('disableTracing');
28 Slow.enableTracing = function() {
29 chrome.send('enableTracing');
32 Slow.tracingPrefChanged = function(enabled) {
33 $('slow-disable').hidden = !enabled;
34 $('slow-enable').hidden = enabled;
37 // Export
38 return {
39 Slow: Slow
41 });
43 function load() {
44 options.Slow.initialize();
45 chrome.send('loadComplete');
48 document.addEventListener('DOMContentLoaded', load);