2 * Copyright 2014 The Chromium Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file.
10 * @extends {WebInspector.Object}
12 WebInspector.InspectorFrontendEventSink = function() {
15 WebInspector.InspectorFrontendEventSink.prototype = {
17 * @param {string} eventType
18 * @param {function(!WebInspector.Event)} listener
19 * @param {!Object=} thisObject
21 addEventListener: function(eventType, listener, thisObject)
23 if (!this.hasEventListeners(eventType))
24 InspectorFrontendHost.subscribe(eventType);
26 WebInspector.Object.prototype.addEventListener.call(this, eventType, listener, thisObject);
30 * @param {string} eventType
31 * @param {function(!WebInspector.Event)} listener
32 * @param {!Object=} thisObject
34 removeEventListener: function(eventType, listener, thisObject)
36 WebInspector.Object.prototype.removeEventListener.call(this, eventType, listener, thisObject);
38 if (!this.hasEventListeners(eventType))
39 InspectorFrontendHost.unsubscribe(eventType);
42 __proto__: WebInspector.Object.prototype