1
function UnityContextManager () {
5
UnityContextManager.prototype.addContext = function (context) {
6
if (this.contexts.indexOf(context) >= 0) {
9
this.contexts.push (context);
12
UnityContextManager.prototype.removeContext = function (context) {
13
var index = this.contexts.indexOf(context);
18
delete this.contexts[this.contexts.indexOf(context)];
23
UnityContextManager.prototype.findContextByWindow = function (window) {
26
for (i in this.contexts) {
27
var context = this.contexts[i];
29
if (context != undefined &&
31
context.window == window) {
39
UnityContextManager.prototype.findContextByParent = function (parent) {
42
for (i in this.contexts) {
43
var context = this.contexts[i];
45
if (context != undefined &&
47
context.parent == parent) {