new SecureWindowFactory()
To delegate the ownership of apps out of other components, so we can keep our components clean, and only hold minimal parts they should know.
To delegate the ownership of apps out of other components,
so we can keep our components clean, and only hold minimal
parts they should know. The user should only need to know
how to create a SecureWindow app via the create
method in
this factory.
- Source:
Members
configs
- Source:
states
Properties:
Name | Type | Description |
---|---|---|
apps |
object | would hold spawned apps and release them while they got terminated. |
- Source:
Methods
create(url, manifestURL)
Create a SecureWindow app.
Create a SecureWindow app.
This:
Parameters:
Name | Type | Description |
---|---|---|
url |
URL | the app's URL |
manifestURL |
URL | the URL of the app's manifest |
- Source:
handleEvent()
- Source:
Listens to Events:
- event:secure-launchapp - launch app by URL and manifest URL.
- secure-modeon - the system would be in the secure mode by locking or other reasons.event:
- event:secure-modeoff - the system now is not in the secure mode anymore.
- secure-appterminated - when a secure app got really closed, it would fire this event.event:
(private) initEvents()
Hook listeners of events this factory interested in.
Hook listeners of events this factory interested in.
This:
- Source:
(private) registerApp()
This:
- Source:
(private) resume()
Hook event listeners back and don't care the resuming
(secure-modeon
) event anymore.
Hook event listeners back and don't care the resuming
(secure-modeon
) event anymore.
This:
- Source:
(private) suspend()
Remove event listeners except the resuming (secure-modeon
)
event.
Remove event listeners except the resuming (secure-modeon
)
event.
This:
- Source:
(private) suspendEvents()
Remove listeners of events this factory interested in.
Remove listeners of events this factory interested in.
This:
- Source:
(private) unregisterApp()
This:
- Source: