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: extensions/renderer/resources/app_window_custom_bindings.js

Issue 2553263002: Remove code to defer app window appearance until first paint. (Closed)
Patch Set: nit Created 4 years 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
« no previous file with comments | « extensions/common/switches.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/resources/app_window_custom_bindings.js
diff --git a/extensions/renderer/resources/app_window_custom_bindings.js b/extensions/renderer/resources/app_window_custom_bindings.js
index 546183f8428a3a87eeb050c109037960c7961228..376e3671bd583319a747dbf9e2969b354d10be7a 100644
--- a/extensions/renderer/resources/app_window_custom_bindings.js
+++ b/extensions/renderer/resources/app_window_custom_bindings.js
@@ -222,7 +222,6 @@ appWindow.registerCustomHook(function(bindingsAPI) {
AppWindow.prototype.resizeTo = $Function.bind(window.resizeTo, window);
AppWindow.prototype.contentWindow = window;
AppWindow.prototype.onClosed = new Event();
- AppWindow.prototype.onWindowFirstShownForTests = new Event();
AppWindow.prototype.close = function() {
this.contentWindow.close();
};
@@ -253,15 +252,6 @@ appWindow.registerCustomHook(function(bindingsAPI) {
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.
- if (this.firstShowHasHappened) {
- callback();
- return;
- }
- this.onWindowFirstShownForTests.addListener(callback);
- }
Object.defineProperty(AppWindow.prototype, 'id', {get: function() {
return appWindowData.id;
@@ -366,16 +356,6 @@ function updateAppWindowProperties(update) {
dispatchEventIfExists(currentWindow, "onAlphaEnabledChanged");
};
-function onAppWindowShownForTests() {
- if (!currentAppWindow)
- return;
-
- if (!currentAppWindow.firstShowHasHappened)
- dispatchEventIfExists(currentAppWindow, "onWindowFirstShownForTests");
-
- currentAppWindow.firstShowHasHappened = true;
-}
-
function onAppWindowClosed() {
if (!currentAppWindow)
return;
@@ -407,4 +387,3 @@ function updateSizeConstraints(boundsType, constraints) {
exports.$set('binding', appWindow.generate());
exports.$set('onAppWindowClosed', onAppWindowClosed);
exports.$set('updateAppWindowProperties', updateAppWindowProperties);
-exports.$set('appWindowShownForTests', onAppWindowShownForTests);
« no previous file with comments | « extensions/common/switches.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698