Merge pull request #4162 from jpevarnek/chrome-windows-getting

Add missing functions for chrome windows api
This commit is contained in:
Masahiro Wakame
2015-04-22 23:50:14 +09:00
2 changed files with 9 additions and 1 deletions

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

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;