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

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

Issue 10896032: HTML titlebars for v2 apps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: move function call logic into ModuleSystem Created 8 years, 3 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 /** 5 /**
6 * Returns a function that throws a 'not available' exception when called. 6 * Returns a function that throws a 'not available' exception when called.
7 * 7 *
8 * @param {string} messagePrefix text to prepend to the exception message. 8 * @param {string} messagePrefix text to prepend to the exception message.
9 */ 9 */
10 function generateDisabledMethodStub(messagePrefix, opt_messageSuffix) { 10 function generateDisabledMethodStub(messagePrefix, opt_messageSuffix) {
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 'onbeforeunload', generateDisabledMethodStub('onbeforeunload')); 109 'onbeforeunload', generateDisabledMethodStub('onbeforeunload'));
110 Window.prototype.__defineSetter__( 110 Window.prototype.__defineSetter__(
111 'onunload', generateDisabledMethodStub('onunload')); 111 'onunload', generateDisabledMethodStub('onunload'));
112 var windowAddEventListener = Window.prototype.addEventListener; 112 var windowAddEventListener = Window.prototype.addEventListener;
113 Window.prototype.addEventListener = function(type) { 113 Window.prototype.addEventListener = function(type) {
114 if (type === 'unload' || type === 'beforeunload') 114 if (type === 'unload' || type === 'beforeunload')
115 generateDisabledMethodStub(type)(); 115 generateDisabledMethodStub(type)();
116 else 116 else
117 return windowAddEventListener.apply(window, arguments); 117 return windowAddEventListener.apply(window, arguments);
118 }; 118 };
119
120 window._setHasTitlebarInternal = function(hasTitlebar) {
121 require('injectAppTitlebar').setHasTitlebar(hasTitlebar);
122 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698