Chromium Code Reviews| Index: components/sync/driver/resources/sync_index.js |
| diff --git a/components/sync/driver/resources/sync_index.js b/components/sync/driver/resources/sync_index.js |
| index 7cce623df43f1377c4a570c4278ab508bc8777ee..2d040ba482262b490806a0bc2f4a6751ad83151a 100644 |
| --- a/components/sync/driver/resources/sync_index.js |
| +++ b/components/sync/driver/resources/sync_index.js |
| @@ -10,3 +10,20 @@ if (cr.isWindows) |
| document.documentElement.setAttribute('os', 'win'); |
| cr.ui.decorate('tabbox', cr.ui.TabBox); |
| + |
| +cr.define('chrome.sync.index', function() { |
| + function setUserEventsTabVisibility(visible) { |
| + $('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
|
| + } |
| + |
| + function onLoad() { |
| + chrome.sync.userEventsVisibilityCallback = setUserEventsTabVisibility; |
| + chrome.sync.requestUserEventsVisibility(); |
| + } |
| + |
| + return { |
| + onLoad: onLoad |
| + }; |
| +}); |
| + |
| +document.addEventListener('DOMContentLoaded', chrome.sync.index.onLoad, false); |