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

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

Issue 306823002: Flip --enable-apps-show-on-first-paint flag. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Tests Created 6 years, 7 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 87ec1b3edddb6be35a26f438eef31bca8f6e552e..770497394415806c91b225526032e976ac9d6627 100644
--- a/chrome/renderer/resources/extensions/app_window_custom_bindings.js
+++ b/chrome/renderer/resources/extensions/app_window_custom_bindings.js
@@ -213,6 +213,7 @@ appWindow.registerCustomHook(function(bindingsAPI) {
AppWindow.prototype.resizeTo = $Function.bind(window.resizeTo, window);
AppWindow.prototype.contentWindow = window;
AppWindow.prototype.onClosed = new Event();
+ AppWindow.prototype.onWindowFirstShown = new Event();
AppWindow.prototype.close = function() {
this.contentWindow.close();
};
@@ -340,6 +341,13 @@ function updateAppWindowProperties(update) {
dispatchEventIfExists(currentWindow, "onRestored");
};
+function onAppWindowFirstShown() {
+ if (!currentAppWindow)
+ return;
+
+ dispatchEventIfExists(currentAppWindow, "onWindowFirstShown");
+}
+
function onAppWindowClosed() {
if (!currentAppWindow)
return;
@@ -371,3 +379,4 @@ function updateSizeConstraints(boundsType, constraints) {
exports.binding = appWindow.generate();
exports.onAppWindowClosed = onAppWindowClosed;
exports.updateAppWindowProperties = updateAppWindowProperties;
+exports.appWindowFirstShown = onAppWindowFirstShown;
« no previous file with comments | « chrome/common/extensions/api/app_window.idl ('k') | chrome/test/data/extensions/platform_apps/active_test/test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698