summaryrefslogtreecommitdiffstats
path: root/chrome/browser/resources/options/managed_user_learn_more.js
blob: ab9d76ddd781ae8798bb0cfba0597fa443f8b50d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

cr.define('options', function() {
  var OptionsPage = options.OptionsPage;

  /**
   * ManagedUserLearnMore class.
   * Encapsulated handling of the 'Learn more...' overlay page.
   * @constructor
   * @class
   */
  function ManagedUserLearnMoreOverlay() {
    OptionsPage.call(this, 'managedUserLearnMore',
                     loadTimeData.getString('managedUserLearnMoreTitle'),
                     'managed-user-learn-more');
  };

  cr.addSingletonGetter(ManagedUserLearnMoreOverlay);

  ManagedUserLearnMoreOverlay.prototype = {
    // Inherit from OptionsPage.
    __proto__: OptionsPage.prototype,

    /**
     * Initialize the page.
     */
    initializePage: function() {
      OptionsPage.prototype.initializePage.call(this);

      $('managed-user-learn-more-done').onclick = function(event) {
        OptionsPage.closeOverlay();
      };
    },
  };

  // Export
  return {
    ManagedUserLearnMoreOverlay: ManagedUserLearnMoreOverlay,
  };
});