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

Side by Side Diff: chrome/renderer/resources/extensions/app_window_custom_bindings.js

Issue 190533006: Add support for transparent background API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Custom binding for the app_window API. 5 // Custom binding for the app_window API.
6 6
7 var appWindowNatives = requireNative('app_window_natives'); 7 var appWindowNatives = requireNative('app_window_natives');
8 var runtimeNatives = requireNative('runtime'); 8 var runtimeNatives = requireNative('runtime');
9 var Binding = require('binding').Binding; 9 var Binding = require('binding').Binding;
10 var Event = require('event_bindings').Event; 10 var Event = require('event_bindings').Event;
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 return appWindowData.minimized; 236 return appWindowData.minimized;
237 }; 237 };
238 AppWindow.prototype.isMaximized = function() { 238 AppWindow.prototype.isMaximized = function() {
239 return appWindowData.maximized; 239 return appWindowData.maximized;
240 }; 240 };
241 AppWindow.prototype.isAlwaysOnTop = function() { 241 AppWindow.prototype.isAlwaysOnTop = function() {
242 return appWindowData.alwaysOnTop; 242 return appWindowData.alwaysOnTop;
243 }; 243 };
244 AppWindow.prototype.alphaEnabled = function() { 244 AppWindow.prototype.alphaEnabled = function() {
245 return appWindowData.alphaEnabled; 245 return appWindowData.alphaEnabled;
246 } 246 };
247 AppWindow.prototype.handleWindowFirstShownForTests = function(callback) { 247 AppWindow.prototype.handleWindowFirstShownForTests = function(callback) {
248 // This allows test apps to get have their callback run even if they 248 // This allows test apps to get have their callback run even if they
249 // call this after the first show has happened. 249 // call this after the first show has happened.
250 if (this.firstShowHasHappened) { 250 if (this.firstShowHasHappened) {
251 callback(); 251 callback();
252 return; 252 return;
253 } 253 }
254 this.onWindowFirstShownForTests.addListener(callback); 254 this.onWindowFirstShownForTests.addListener(callback);
255 } 255 }
256 256
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 constraints[key] = 0; 392 constraints[key] = 0;
393 }); 393 });
394 394
395 currentWindowInternal.setSizeConstraints(boundsType, constraints); 395 currentWindowInternal.setSizeConstraints(boundsType, constraints);
396 } 396 }
397 397
398 exports.binding = appWindow.generate(); 398 exports.binding = appWindow.generate();
399 exports.onAppWindowClosed = onAppWindowClosed; 399 exports.onAppWindowClosed = onAppWindowClosed;
400 exports.updateAppWindowProperties = updateAppWindowProperties; 400 exports.updateAppWindowProperties = updateAppWindowProperties;
401 exports.appWindowShownForTests = onAppWindowShownForTests; 401 exports.appWindowShownForTests = onAppWindowShownForTests;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698