OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 3 * Use of this source code is governed by a BSD-style license that can be |
4 * found in the LICENSE file. | 4 * found in the LICENSE file. |
5 */ | 5 */ |
6 | 6 |
7 /** | 7 /** |
8 * @constructor | 8 * @constructor |
9 * @extends {WebInspector.Object} | 9 * @extends {WebInspector.Object} |
10 */ | 10 */ |
11 WebInspector.TargetManager = function() | 11 WebInspector.TargetManager = function() |
12 { | 12 { |
13 WebInspector.Object.call(this); | 13 WebInspector.Object.call(this); |
14 /** @type {!Array.<!WebInspector.Target>} */ | 14 /** @type {!Array.<!WebInspector.Target>} */ |
15 this._targets = []; | 15 this._targets = []; |
16 /** @type {!Array.<!WebInspector.TargetManager.Observer>} */ | 16 /** @type {!Array.<!WebInspector.TargetManager.Observer>} */ |
17 this._observers = []; | 17 this._observers = []; |
18 this._observerCapabiliesMaskSymbol = Symbol("observerCapabilitiesMask"); | 18 this._observerCapabiliesMaskSymbol = Symbol("observerCapabilitiesMask"); |
19 /** @type {!Map<symbol, !Array<{modelClass: !Function, thisObject: (!Object|
undefined), listener: function(!WebInspector.Event)}>>} */ | 19 /** @type {!Map<symbol, !Array<{modelClass: !Function, thisObject: (!Object|
undefined), listener: function(!WebInspector.Event)}>>} */ |
20 this._modelListeners = new Map(); | 20 this._modelListeners = new Map(); |
21 this._isSuspended = false; | 21 this._isSuspended = false; |
22 } | 22 } |
23 | 23 |
24 /** @enum {symbol} */ | 24 /** @enum {symbol} */ |
25 WebInspector.TargetManager.Events = { | 25 WebInspector.TargetManager.Events = { |
26 InspectedURLChanged: Symbol("InspectedURLChanged"), | 26 InspectedURLChanged: Symbol("InspectedURLChanged"), |
| 27 Load: Symbol("Load"), |
27 MainFrameNavigated: Symbol("MainFrameNavigated"), | 28 MainFrameNavigated: Symbol("MainFrameNavigated"), |
28 Load: Symbol("Load"), | 29 NameChanged: Symbol("NameChanged"), |
29 PageReloadRequested: Symbol("PageReloadRequested"), | 30 PageReloadRequested: Symbol("PageReloadRequested"), |
30 WillReloadPage: Symbol("WillReloadPage"), | 31 WillReloadPage: Symbol("WillReloadPage"), |
31 TargetDisposed: Symbol("TargetDisposed"), | 32 TargetDisposed: Symbol("TargetDisposed"), |
32 SuspendStateChanged: Symbol("SuspendStateChanged") | 33 SuspendStateChanged: Symbol("SuspendStateChanged") |
33 } | 34 } |
34 | 35 |
35 WebInspector.TargetManager._listenersSymbol = Symbol("WebInspector.TargetManager
.Listeners"); | 36 WebInspector.TargetManager._listenersSymbol = Symbol("WebInspector.TargetManager
.Listeners"); |
36 | 37 |
37 WebInspector.TargetManager.prototype = { | 38 WebInspector.TargetManager.prototype = { |
38 suspendAllTargets: function() | 39 suspendAllTargets: function() |
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
380 /** | 381 /** |
381 * @param {!WebInspector.Target} target | 382 * @param {!WebInspector.Target} target |
382 */ | 383 */ |
383 targetRemoved: function(target) { }, | 384 targetRemoved: function(target) { }, |
384 } | 385 } |
385 | 386 |
386 /** | 387 /** |
387 * @type {!WebInspector.TargetManager} | 388 * @type {!WebInspector.TargetManager} |
388 */ | 389 */ |
389 WebInspector.targetManager = new WebInspector.TargetManager(); | 390 WebInspector.targetManager = new WebInspector.TargetManager(); |
OLD | NEW |