Index: third_party/WebKit/Source/devtools/front_end/protocol/InspectorBackend.js |
diff --git a/third_party/WebKit/Source/devtools/front_end/protocol/InspectorBackend.js b/third_party/WebKit/Source/devtools/front_end/protocol/InspectorBackend.js |
index 8dffb4581a19902f968543fd6458e0e65f608e80..1e82e6f92ab79d9e82ceb6448a7461c8c51aa7ce 100644 |
--- a/third_party/WebKit/Source/devtools/front_end/protocol/InspectorBackend.js |
+++ b/third_party/WebKit/Source/devtools/front_end/protocol/InspectorBackend.js |
@@ -67,22 +67,22 @@ Protocol.InspectorBackend = class { |
var methodName = domain.substr(0, upperCaseLength).toLowerCase() + domain.slice(upperCaseLength) + 'Agent'; |
/** |
- * @this {Protocol.TargetBase} |
+ * @this {Protocol.Dispatcher} |
*/ |
function agentGetter() { |
return this._agents[domain]; |
} |
- Protocol.TargetBase.prototype[methodName] = agentGetter; |
+ Protocol.Dispatcher.prototype[methodName] = agentGetter; |
/** |
- * @this {Protocol.TargetBase} |
+ * @this {Protocol.Dispatcher} |
*/ |
function registerDispatcher(dispatcher) { |
- this.registerDispatcher(domain, dispatcher); |
+ this._registerDispatcher(domain, dispatcher); |
} |
- Protocol.TargetBase.prototype['register' + domain + 'Dispatcher'] = registerDispatcher; |
+ Protocol.Dispatcher.prototype['register' + domain + 'Dispatcher'] = registerDispatcher; |
} |
/** |
@@ -212,7 +212,7 @@ Protocol.InspectorBackend.Connection.Factory; |
/** |
* @unrestricted |
*/ |
-Protocol.TargetBase = class { |
+Protocol.Dispatcher = class { |
/** |
* @param {!Protocol.InspectorBackend.Connection.Factory} connectionFactory |
*/ |
@@ -376,7 +376,7 @@ Protocol.TargetBase = class { |
* @param {string} domain |
* @param {!Object} dispatcher |
*/ |
- registerDispatcher(domain, dispatcher) { |
+ _registerDispatcher(domain, dispatcher) { |
if (!this._dispatchers[domain]) |
return; |
@@ -424,13 +424,15 @@ Protocol.TargetBase = class { |
_onDisconnect(reason) { |
this._connection = null; |
this._runPendingCallbacks(); |
- this.dispose(); |
+ if (this._disposeCallback) |
caseq
2017/04/29 02:12:53
Rename to _disconnectCallback.
|
+ this._disposeCallback.call(null); |
} |
/** |
- * @protected |
+ * @param {function()} callback |
*/ |
- dispose() { |
+ setDisposeCallback(callback) { |
+ this._disposeCallback = callback; |
} |
/** |
@@ -484,7 +486,7 @@ Protocol.InspectorBackend._AgentPrototype = class { |
} |
/** |
- * @param {!Protocol.TargetBase} target |
+ * @param {!Protocol.Dispatcher} target |
caseq
2017/04/29 02:12:53
This is confusing. Should this be renamed?
|
*/ |
setTarget(target) { |
this._target = target; |