• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
3// found in the LICENSE file.
4
5/**
6 * Global wallpaperManager reference useful for poking at from the console.
7 */
8var wallpaperManager;
9
10function init() {
11  chrome.firstRunPrivate.getLocalizedStrings(function(strings) {
12    loadTimeData.data = strings;
13    i18nTemplate.process(document, loadTimeData);
14  });
15  var content = $('greeting');
16  var closeButton = content.getElementsByClassName('close-button')[0];
17  // Make close unfocusable by mouse.
18  closeButton.addEventListener('mousedown', function(e) {
19    e.preventDefault();
20  });
21  closeButton.addEventListener('click', function(e) {
22    appWindow.close();
23    e.stopPropagation();
24  });
25  var tutorialButton = content.getElementsByClassName('next-button')[0];
26  tutorialButton.addEventListener('click', function(e) {
27    chrome.firstRunPrivate.launchTutorial();
28    appWindow.close();
29    e.stopPropagation();
30  });
31}
32
33document.addEventListener('DOMContentLoaded', init);
34