new SecureWindowManager()
Manage SecureWindow apps.
Manage SecureWindow apps. This is a subset of the AppWindow manager, and will not handle most cases the later one would handle. Only those meaningful cases, like secure app open, close, requesting kill all apps or turn the secure mode on/off, would be handled. However, if we need to handle cases in the future, we would extend this manager.
So far the SecureWindowManager would only manager 1 secure app at once, but there're already some designations for multiple apps.
- Source:
Members
configs
- Source:
elements
Properties:
Name | Type | Description |
---|---|---|
windows |
DOMElement | the |
screen |
DOMElement | the |
- Source:
states
Properties:
Name | Type | Description |
---|---|---|
killMode |
boolean | If this mode is on, all closing app would be closed immediately, and with no animation. |
- Source:
Methods
(private) activateApp()
Set an app as the active app.
Set an app as the active app.
This:
- Source:
allowed(config) → {boolean}
See if the app is a secure app and can be managed by the manager.
See if the app is a secure app and can be managed by the manager.
This:
Parameters:
Name | Type | Description |
---|---|---|
config |
AppConfig | the configuration of the app. |
- Source:
Returns:
- if this app's config represent it's a secure app
and can be managed by the manager.
- Type
- boolean
(private) deactivateApp()
Deactivate the current active app.
Deactivate the current active app.
This:
- Source:
handleEvent()
This:
- Source:
Listens to Events:
- secure-killapps - means to kill remain apps, and make it ready to turn the secure mode off.event:
- secure-closeapps - means to close remain apps. It's similar to the event above, but would show the closing animation.event:
- secure-appcreated - when a secure app got created, it would fire this event.event:
- secure-appterminated - when a secure app got really closed, it would fire this event.event:
- secure-apprequestclose - when a secure app has been called to close itself, the event would be firedevent:
(private) initElements()
This:
- Source:
(private) initEvents()
Hook listeners of events this manager interested in.
Hook listeners of events this manager interested in.
This:
- Source:
(private) killApps()
Close/Kill all manager secure apps, which has been registered while they're created and opened.
Close/Kill all manager secure apps, which has been registered while they're created and opened.
If the configs.killMode
is on (by event secure-killapps
),
the closing would be instantly. Otherwise, app will close with
default animation.
This:
- Source:
(private) publish()
Message passing method.
Message passing method. Would publish to the whole System app.
This:
- Source:
(private) registerApp()
This:
- Source:
(private) softKillApps()
Soft kill all running secure apps.
Soft kill all running secure apps. This allows the secure apps enough time to gracefully shutdown before being killed.
This:
- Source:
(private) unregisterApp()
This:
- Source: