[Extensions] Make extension message bubble factory platform-abstract
[chromium-blink-merge.git] / chrome / browser / resources / chromeos / login / oobe_screen_reset_confirmation_overlay.js
blobb1f3288d2ecb54c365ad69b808e1b7a47f321ef1
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.
5 cr.define('reset', function() {
7 var USER_ACTION_RESET_CONFIRM_DISMISSED = 'reset-confirm-dismissed';
8 /**
9 * ResetScreenConfirmationOverlay class
10 * Encapsulated handling of the 'Confirm reset device' overlay OOBE page.
11 * @class
13 function ConfirmResetOverlay() {
16 cr.addSingletonGetter(ConfirmResetOverlay);
18 ConfirmResetOverlay.prototype = {
19 /**
20 * Initialize the page.
22 initializePage: function() {
23 var overlay = $('reset-confirm-overlay');
24 overlay.addEventListener('cancelOverlay', function(e) {
25 $('reset').send(login.Screen.CALLBACK_USER_ACTED,
26 USER_ACTION_RESET_CONFIRM_DISMISSED);
27 e.stopPropagation();
28 });
29 $('overlay-reset').removeAttribute('hidden');
33 // Export
34 return {
35 ConfirmResetOverlay: ConfirmResetOverlay
37 });