| Index: chrome/browser/resources/chromeos/slow.js
|
| diff --git a/chrome/browser/resources/chromeos/slow.js b/chrome/browser/resources/chromeos/slow.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..e0e84bfc676f61892d9f71e90f10e0f6081716cf
|
| --- /dev/null
|
| +++ b/chrome/browser/resources/chromeos/slow.js
|
| @@ -0,0 +1,48 @@
|
| +// Copyright (c) 2013 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.
|
| +
|
| +cr.define('options', function() {
|
| + function Slow() {
|
| + }
|
| + cr.addSingletonGetter(Slow);
|
| +
|
| + Slow.prototype = {
|
| + initialized_: false
|
| + };
|
| +
|
| + Slow.initialize = function() {
|
| + $('slow-disable').addEventListener('click', function(event) {
|
| + Slow.disableTracing();
|
| + });
|
| + $('slow-enable').addEventListener('click', function(event) {
|
| + Slow.enableTracing();
|
| + });
|
| + this.initialized_ = true;
|
| + };
|
| +
|
| + Slow.disableTracing = function() {
|
| + chrome.send('disableTracing');
|
| + };
|
| +
|
| + Slow.enableTracing = function() {
|
| + chrome.send('enableTracing');
|
| + };
|
| +
|
| + Slow.tracingPrefChanged = function(enabled) {
|
| + $('slow-disable').hidden = !enabled;
|
| + $('slow-enable').hidden = enabled;
|
| + };
|
| +
|
| + // Export
|
| + return {
|
| + Slow: Slow
|
| + };
|
| +});
|
| +
|
| +function load() {
|
| + options.Slow.initialize();
|
| + chrome.send('loadComplete');
|
| +}
|
| +
|
| +document.addEventListener('DOMContentLoaded', load);
|
|
|