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

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

Issue 22336007: Add chrome://slow for enabling performance tracing for feedback reports. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix nit Created 7 years, 4 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 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.
4
5 cr.define('options', function() {
6 function Slow() {
7 }
8 cr.addSingletonGetter(Slow);
9
10 Slow.prototype = {
11 initialized_: false
12 };
13
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;
22 };
23
24 Slow.disableTracing = function() {
25 chrome.send('disableTracing');
26 };
27
28 Slow.enableTracing = function() {
29 chrome.send('enableTracing');
30 };
31
32 Slow.tracingPrefChanged = function(enabled) {
33 $('slow-disable').hidden = !enabled;
34 $('slow-enable').hidden = enabled;
35 };
36
37 // Export
38 return {
39 Slow: Slow
40 };
41 });
42
43 function load() {
44 options.Slow.initialize();
45 chrome.send('loadComplete');
46 }
47
48 document.addEventListener('DOMContentLoaded', load);
OLDNEW
« no previous file with comments | « chrome/browser/resources/chromeos/slow.html ('k') | chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698