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

Side by Side Diff: components/sync/driver/resources/sync_index.js

Issue 2872023002: [Sync] Add a simple UI to sync-internals to create UserEvents. (Closed)
Patch Set: Fixed unittests. Created 3 years, 7 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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // Allow platform specific CSS rules. 5 // Allow platform specific CSS rules.
6 // 6 //
7 // TODO(akalin): BMM and options page does something similar, too. 7 // TODO(akalin): BMM and options page does something similar, too.
8 // Move this to util.js. 8 // Move this to util.js.
9 if (cr.isWindows) 9 if (cr.isWindows)
10 document.documentElement.setAttribute('os', 'win'); 10 document.documentElement.setAttribute('os', 'win');
11 11
12 cr.ui.decorate('tabbox', cr.ui.TabBox); 12 cr.ui.decorate('tabbox', cr.ui.TabBox);
13
14 cr.define('chrome.sync.index', function() {
15 function setUserEventsTabVisibility(visible) {
16 $('sync-user-events-tab').style.display = visible ? 'block' : 'none';
Dan Beam 2017/05/16 22:40:54 $('sync-user-events-tab').hidden = !visible;
skym 2017/05/22 21:55:48 This doesn't work, see https://codereview.chromium
17 }
18
19 function onLoad() {
20 chrome.sync.userEventsVisibilityCallback = setUserEventsTabVisibility;
21 chrome.sync.requestUserEventsVisibility();
22 }
23
24 return {
25 onLoad: onLoad
26 };
27 });
28
29 document.addEventListener('DOMContentLoaded', chrome.sync.index.onLoad, false);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698