Add missing functions for chrome windows api

This commit is contained in:
Jonathan Pevarnek
2015-04-20 18:07:37 -04:00
parent 1957eb54fb
commit c0b249ae79
2 changed files with 9 additions and 1 deletions
+6 -1
View File
@@ -23,8 +23,13 @@ chrome.app.runtime.onLaunched.addListener(function (launchData: runtime.LaunchDa
chrome.app.runtime.onRestarted.addListener(function () { return; });
// Get Current Window
// retrieving windows
var currentWindow: cwindow.AppWindow = chrome.app.window.current();
var otherWindow: cwindow.AppWindow = chrome.app.window.get('some-string');
var allWindows: cwindow.AppWindow[] = chrome.app.window.getAll();
// check platform capabilities
var visibleEverywhere: boolean = chrome.app.window.canSetVisibleOnAllWorkspaces();
// FileSystem
// https://developer.chrome.com/apps/fileSystem
+3
View File
@@ -126,6 +126,9 @@ declare module chrome.app.window {
export function create(url: string, options?: CreateWindowOptions, callback?: (created_window: AppWindow) => void): void;
export function current(): AppWindow;
export function get(id: string): AppWindow;
export function getAll(): AppWindow[];
export function canSetVisibleOnAllWorkspaces(): boolean;
interface WindowEvent {
addListener(callback: () => void): void;