Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / resources / chromeos / login / oobe_screen_host_pairing.js
1 // Copyright 2014 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  * @fileoverview host pairing screen implementation.
7  */
8
9 login.createScreen('HostPairingScreen', 'host-pairing', function() {
10   /**
11    * We can't pass Polymer screen directly to login.createScreen, because it
12    * changes object's prototype chain.
13    */
14   return {
15     polymerScreen_: null,
16
17     decorate: function() {
18       polymerScreen_ = this.children[0];
19       polymerScreen_.decorate(this);
20     },
21
22     onBeforeShow: function() {
23       polymerScreen_.onBeforeShow();
24     }
25   };
26 });
27
28 Polymer('host-pairing-screen', (function() {
29   'use strict';
30
31   /** @const */ var CALLBACK_CONTEXT_READY = 'contextReady';
32
33   return {
34     onBeforeShow: function() {
35       Oobe.getInstance().headerHidden = true;
36     },
37
38     /** @override */
39     initialize: function() {
40       this.send(CALLBACK_CONTEXT_READY);
41     }
42   };
43 })());
44