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

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

Issue 375183002: Add app.window.alphaEnabled() and onAlphaEnabledChanged. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync and rebase Created 6 years, 5 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 99ca8bcf2248723d0eff679c4a5fa7467f364592..c666d32557717c93ea4253372142caa90f059a77 100644
--- a/chrome/renderer/resources/extensions/app_window_custom_bindings.js
+++ b/chrome/renderer/resources/extensions/app_window_custom_bindings.js
@@ -241,6 +241,9 @@ appWindow.registerCustomHook(function(bindingsAPI) {
AppWindow.prototype.isAlwaysOnTop = function() {
return appWindowData.alwaysOnTop;
};
+ AppWindow.prototype.alphaEnabled = function() {
+ return appWindowData.alphaEnabled;
+ }
AppWindow.prototype.handleWindowFirstShownForTests = function(callback) {
// This allows test apps to get have their callback run even if they
// call this after the first show has happened.
@@ -301,7 +304,8 @@ appWindow.registerCustomHook(function(bindingsAPI) {
alwaysOnTop: params.alwaysOnTop,
hasFrameColor: params.hasFrameColor,
activeFrameColor: params.activeFrameColor,
- inactiveFrameColor: params.inactiveFrameColor
+ inactiveFrameColor: params.inactiveFrameColor,
+ alphaEnabled: params.alphaEnabled
};
currentAppWindow = new AppWindow;
});
@@ -348,6 +352,9 @@ function updateAppWindowProperties(update) {
(oldData.minimized && !update.minimized) ||
(oldData.maximized && !update.maximized))
dispatchEventIfExists(currentWindow, "onRestored");
+
+ if (oldData.alphaEnabled !== update.alphaEnabled)
+ dispatchEventIfExists(currentWindow, "onAlphaEnabledChanged");
};
function onAppWindowShownForTests() {
« no previous file with comments | « chrome/common/extensions/api/app_window.idl ('k') | ui/views/widget/desktop_aura/desktop_native_widget_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698