| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * | 10 * |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 } | 83 } |
| 84 | 84 |
| 85 this._setMode(mode); | 85 this._setMode(mode); |
| 86 } | 86 } |
| 87 | 87 |
| 88 /** | 88 /** |
| 89 * @param {!Protocol.DOM.InspectMode} mode | 89 * @param {!Protocol.DOM.InspectMode} mode |
| 90 */ | 90 */ |
| 91 _setMode(mode) { | 91 _setMode(mode) { |
| 92 this._mode = mode; | 92 this._mode = mode; |
| 93 for (var domModel of SDK.DOMModel.instances()) | 93 for (var domModel of SDK.targetManager.models(SDK.DOMModel)) |
| 94 domModel.setInspectMode(mode); | 94 domModel.setInspectMode(mode); |
| 95 this._toggleSearchAction.setToggled(this.isInInspectElementMode()); | 95 this._toggleSearchAction.setToggled(this.isInInspectElementMode()); |
| 96 } | 96 } |
| 97 | 97 |
| 98 _suspendStateChanged() { | 98 _suspendStateChanged() { |
| 99 if (!SDK.targetManager.allTargetsSuspended()) | 99 if (!SDK.targetManager.allTargetsSuspended()) |
| 100 return; | 100 return; |
| 101 | 101 |
| 102 this._mode = Protocol.DOM.InspectMode.None; | 102 this._mode = Protocol.DOM.InspectMode.None; |
| 103 this._toggleSearchAction.setToggled(false); | 103 this._toggleSearchAction.setToggled(false); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 119 if (!Elements.inspectElementModeController) | 119 if (!Elements.inspectElementModeController) |
| 120 return false; | 120 return false; |
| 121 Elements.inspectElementModeController._toggleInspectMode(); | 121 Elements.inspectElementModeController._toggleInspectMode(); |
| 122 return true; | 122 return true; |
| 123 } | 123 } |
| 124 }; | 124 }; |
| 125 | 125 |
| 126 /** @type {?Elements.InspectElementModeController} */ | 126 /** @type {?Elements.InspectElementModeController} */ |
| 127 Elements.inspectElementModeController = | 127 Elements.inspectElementModeController = |
| 128 Runtime.queryParam('isSharedWorker') ? null : new Elements.InspectElementMod
eController(); | 128 Runtime.queryParam('isSharedWorker') ? null : new Elements.InspectElementMod
eController(); |
| OLD | NEW |