【发布时间】:2015-12-01 04:48:53
【问题描述】:
我发现有几个地方在谈论尝试在屏幕之间扩展窗口,启用了统一桌面标签,但没有用。
我还发现一些地方在谈论在 Windows 中使用 Win32 调用来执行此操作,这对 ChromeOS 来说是无用的。
我只需要在第二个屏幕上放置第二个 Web 视图。它不需要是扩展窗口。我只需要这样做:
chrome.app.runtime.onLaunched.addListener(function() {
var screenOne = {
'id': 'mainwin',
'bounds': {
'width': 768,
'height': 1360
}
};
var screenTwo = {
'id': 'secondwin',
'bounds': {
'left':768+768,
'width': 768,
'height': 1360
}
};
chrome.power.requestKeepAwake("display");
chrome.app.window.create('../index.html', (screenOne));
chrome.app.window.create('../screen2/index.html', (screenTwo));
});
此外,在模拟器中运行的解决方案的奖励积分。
【问题讨论】: