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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/elements/InspectElementModeController.js

Issue 2778283002: [DevTools] Do not inherit SDK.DOMNode from SDK.SDKObject (Closed)
Patch Set: Created 3 years, 8 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 unified diff | Download patch
OLDNEW
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
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
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();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698