Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6023)

Unified Diff: chrome/renderer/resources/extensions/app_window_custom_bindings.js

Issue 186343002: Create windows for new app window bounds API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed nit Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/renderer/resources/extensions/app_window_custom_bindings.js
diff --git a/chrome/renderer/resources/extensions/app_window_custom_bindings.js b/chrome/renderer/resources/extensions/app_window_custom_bindings.js
index 53eed442300036a6a1a8472186bd19255e05f1dc..8950667698548862cdc6bc190a902b2866f70e21 100644
--- a/chrome/renderer/resources/extensions/app_window_custom_bindings.js
+++ b/chrome/renderer/resources/extensions/app_window_custom_bindings.js
@@ -169,9 +169,13 @@ appWindow.registerCustomHook(function(bindingsAPI) {
this.contentWindow.close();
};
AppWindow.prototype.getBounds = function() {
- var bounds = appWindowData.innerBounds;
- return { left: bounds.left, top: bounds.top,
- width: bounds.width, height: bounds.height };
+ // This is to maintain backcompatibility with a bug on Windows and
+ // ChromeOS, which returns the position of the window but the size of
+ // the content.
+ var innerBounds = appWindowData.innerBounds;
+ var outerBounds = appWindowData.outerBounds;
+ return { left: outerBounds.left, top: outerBounds.top,
+ width: innerBounds.width, height: innerBounds.height };
};
AppWindow.prototype.getMinWidth = function() {
return appWindowData.innerBounds.minWidth;
« no previous file with comments | « chrome/common/extensions/api/app_window.idl ('k') | chrome/test/data/extensions/platform_apps/window_api/test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698