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

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

Issue 307833002: Move some extensions renderer resources to extensions_renderer_resources.grd. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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/unload_event.js
diff --git a/chrome/renderer/resources/extensions/unload_event.js b/chrome/renderer/resources/extensions/unload_event.js
deleted file mode 100644
index 52cf889bf2618660b9b3926a06aa596080a5bd07..0000000000000000000000000000000000000000
--- a/chrome/renderer/resources/extensions/unload_event.js
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Special unload event. We don't use the DOM unload because that slows down
-// tab shutdown. On the other hand, onUnload might not always fire, since
-// Chrome will terminate renderers on shutdown (SuddenTermination).
-
-// Implement a primitive subset of the Event interface as needed, since if this
-// was to use the real event object there would be a circular dependency.
-var listeners = [];
-
-exports.addListener = function(listener) {
- $Array.push(listeners, listener);
-};
-
-exports.removeListener = function(listener) {
- for (var i = 0; i < listeners.length; ++i) {
- if (listeners[i] == listener) {
- $Array.splice(listeners, i, 1);
- return;
- }
- }
-};
-
-exports.wasDispatched = false;
-
-// dispatch() is called from C++.
-exports.dispatch = function() {
- exports.wasDispatched = true;
- for (var i = 0; i < listeners.length; ++i)
- listeners[i]();
-};
« no previous file with comments | « chrome/renderer/resources/extensions/uncaught_exception_handler.js ('k') | chrome/renderer/resources/extensions/utils.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698