summaryrefslogtreecommitdiff
path: root/src/web/app/common
diff options
context:
space:
mode:
authorこぴなたみぽ <syuilotan@yahoo.co.jp>2018-02-11 22:04:08 +0900
committerこぴなたみぽ <syuilotan@yahoo.co.jp>2018-02-11 22:04:08 +0900
commita0f3182a0a940602a0b94ab42c488144eba0ec63 (patch)
tree877d5cba2b1a235ee449f2f17f6c0c23ef15152c /src/web/app/common
parentwip (diff)
downloadmisskey-a0f3182a0a940602a0b94ab42c488144eba0ec63.tar.gz
misskey-a0f3182a0a940602a0b94ab42c488144eba0ec63.tar.bz2
misskey-a0f3182a0a940602a0b94ab42c488144eba0ec63.zip
wip
Diffstat (limited to 'src/web/app/common')
-rw-r--r--src/web/app/common/mios.ts21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/web/app/common/mios.ts b/src/web/app/common/mios.ts
index e91def521b..550d9e6bfd 100644
--- a/src/web/app/common/mios.ts
+++ b/src/web/app/common/mios.ts
@@ -80,6 +80,11 @@ export default class MiOS extends EventEmitter {
private shouldRegisterSw: boolean;
/**
+ * ウィンドウシステム
+ */
+ public windows = new WindowSystem();
+
+ /**
* MiOSインスタンスを作成します
* @param shouldRegisterSw ServiceWorkerを登録するかどうか
*/
@@ -359,6 +364,22 @@ export default class MiOS extends EventEmitter {
}
}
+class WindowSystem {
+ private windows = new Set();
+
+ public add(window) {
+ this.windows.add(window);
+ }
+
+ public remove(window) {
+ this.windows.delete(window);
+ }
+
+ public getAll() {
+ return this.windows;
+ }
+}
+
/**
* Convert the URL safe base64 string to a Uint8Array
* @param base64String base64 string