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

Side by Side Diff: chrome/browser/resources/chromeos/slow.js

Issue 2944703004: Run clang-format on .js files in c/b/r/chromeos (Closed)
Patch Set: Created 3 years, 6 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
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 cr.define('options', function() { 5 cr.define('options', function() {
6 function Slow() { 6 function Slow() {}
7 }
8 cr.addSingletonGetter(Slow); 7 cr.addSingletonGetter(Slow);
9 8
10 Slow.prototype = { 9 Slow.prototype = {initialized_: false};
11 initialized_: false
12 };
13 10
14 Slow.initialize = function() { 11 Slow.initialize = function() {
15 $('slow-disable').addEventListener('click', function(event) { 12 $('slow-disable').addEventListener('click', function(event) {
16 Slow.disableTracing(); 13 Slow.disableTracing();
17 }); 14 });
18 $('slow-enable').addEventListener('click', function(event) { 15 $('slow-enable').addEventListener('click', function(event) {
19 Slow.enableTracing(); 16 Slow.enableTracing();
20 }); 17 });
21 this.initialized_ = true; 18 this.initialized_ = true;
22 }; 19 };
23 20
24 Slow.disableTracing = function() { 21 Slow.disableTracing = function() {
25 chrome.send('disableTracing'); 22 chrome.send('disableTracing');
26 }; 23 };
27 24
28 Slow.enableTracing = function() { 25 Slow.enableTracing = function() {
29 chrome.send('enableTracing'); 26 chrome.send('enableTracing');
30 }; 27 };
31 28
32 Slow.tracingPrefChanged = function(enabled) { 29 Slow.tracingPrefChanged = function(enabled) {
33 $('slow-disable').hidden = !enabled; 30 $('slow-disable').hidden = !enabled;
34 $('slow-enable').hidden = enabled; 31 $('slow-enable').hidden = enabled;
35 }; 32 };
36 33
37 // Export 34 // Export
38 return { 35 return {Slow: Slow};
39 Slow: Slow
40 };
41 }); 36 });
42 37
43 function load() { 38 function load() {
44 options.Slow.initialize(); 39 options.Slow.initialize();
45 chrome.send('loadComplete'); 40 chrome.send('loadComplete');
46 } 41 }
47 42
48 document.addEventListener('DOMContentLoaded', load); 43 document.addEventListener('DOMContentLoaded', load);
OLDNEW
« no previous file with comments | « chrome/browser/resources/chromeos/sim_unlock.js ('k') | chrome/browser/resources/chromeos/switch_access/automation_manager.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698