OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 var ExtensionOptionsConstants = | 5 var ExtensionOptionsConstants = |
6 require('extensionOptionsConstants').ExtensionOptionsConstants; | 6 require('extensionOptionsConstants').ExtensionOptionsConstants; |
7 var ExtensionOptionsEvents = | 7 var ExtensionOptionsEvents = |
8 require('extensionOptionsEvents').ExtensionOptionsEvents; | 8 require('extensionOptionsEvents').ExtensionOptionsEvents; |
9 var GuestViewContainer = require('guestViewContainer').GuestViewContainer; | 9 var GuestViewContainer = require('guestViewContainer').GuestViewContainer; |
10 | 10 |
(...skipping 23 matching lines...) Expand all Loading... |
34 // Destroy the old guest if one exists. | 34 // Destroy the old guest if one exists. |
35 this.guest.destroy(); | 35 this.guest.destroy(); |
36 | 36 |
37 this.guest.create(this.buildParams(), function() { | 37 this.guest.create(this.buildParams(), function() { |
38 if (!this.guest.getId()) { | 38 if (!this.guest.getId()) { |
39 // Fire a createfailed event here rather than in ExtensionOptionsGuest | 39 // Fire a createfailed event here rather than in ExtensionOptionsGuest |
40 // because the guest will not be created, and cannot fire an event. | 40 // because the guest will not be created, and cannot fire an event. |
41 var createFailedEvent = new Event('createfailed', { bubbles: true }); | 41 var createFailedEvent = new Event('createfailed', { bubbles: true }); |
42 this.dispatchEvent(createFailedEvent); | 42 this.dispatchEvent(createFailedEvent); |
43 } else { | 43 } else { |
44 this.attachWindow(); | 44 this.attachWindow$(); |
45 } | 45 } |
46 }.bind(this)); | 46 }.bind(this)); |
47 }; | 47 }; |
48 | 48 |
49 GuestViewContainer.registerElement(ExtensionOptionsImpl); | 49 GuestViewContainer.registerElement(ExtensionOptionsImpl); |
50 | 50 |
51 // Exports. | 51 // Exports. |
52 exports.ExtensionOptionsImpl = ExtensionOptionsImpl; | 52 exports.ExtensionOptionsImpl = ExtensionOptionsImpl; |
OLD | NEW |