summaryrefslogtreecommitdiffstats
path: root/chrome/browser/resources/options2/chromeos/keyboard_overlay.js
blob: 8bcc5adae96f8629bd0792360bcfa2b7a2d4c2b3 (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
// Copyright (c) 2012 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() {
  const OptionsPage = options.OptionsPage;

  /**
   * Encapsulated handling of the keyboard overlay.
   * @constructor
   */
  function KeyboardOverlay() {
    OptionsPage.call(this, 'keyboard-overlay',
                     templateData.keyboardOverlayTitle, 'keyboard-overlay');
  }

  cr.addSingletonGetter(KeyboardOverlay);

  KeyboardOverlay.prototype = {
    __proto__: OptionsPage.prototype,

    /** @inheritDoc */
    initializePage: function() {
      OptionsPage.prototype.initializePage.call(this);

      $('keyboard-overlay-dismiss-button').onclick = function() {
        OptionsPage.closeOverlay();
      };
    }
  };

  // Export
  return {
    KeyboardOverlay: KeyboardOverlay
  };
});