NaCl: Update revision in DEPS, r12770 -> r12773
[chromium-blink-merge.git] / chrome / browser / resources / about_welcome_android / about_welcome_android.js
blobb5f65b4ed9eee7634076b26a9cf0bdfd74a105ee
1 // Copyright (c) 2012 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.
5 // File Description:
6 // Contains all the necessary functions for rendering the Welcome page on
7 // Android.
9 cr.define('welcome', function() {
10 'use strict';
12 function initialize() {
13 // Disable context menus.
14 document.body.oncontextmenu = function(e) {
15 e.preventDefault();
18 $('settings').onclick = function() {
19 chrome.send('showSyncSettings');
22 var tosLink = $('tos-link');
23 if (tosLink) {
24 tosLink.onclick = function() {
25 chrome.send('showTermsOfService');
29 // Set visibility of terms of service footer.
30 $('tos-footer').hidden = !loadTimeData.getBoolean('tosVisible');
32 // Set the initial visibility for the sync footer.
33 chrome.send('updateSyncFooterVisibility');
36 /**
37 * Sets the visibility of the sync footer.
38 * @param {boolean} isVisible Whether the sync footer should be visible.
40 function setSyncFooterVisible(isVisible) {
41 $('sync-footer').hidden = !isVisible;
44 // Return an object with all of the exports.
45 return {
46 initialize: initialize,
47 setSyncFooterVisible: setSyncFooterVisible,
49 });
51 document.addEventListener('DOMContentLoaded', welcome.initialize);