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

Unified Diff: Source/devtools/front_end/sdk/DOMModel.js

Issue 1310273006: Devtools: convert pair of booleans in setInspectModeEnabled into enum parameter (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Address comments Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/devtools/front_end/screencast/ScreencastView.js ('k') | Source/devtools/protocol.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/sdk/DOMModel.js
diff --git a/Source/devtools/front_end/sdk/DOMModel.js b/Source/devtools/front_end/sdk/DOMModel.js
index aec85a2d3bb4339c0397570197acb0f23340e69b..ad79b3555fd439cb6e8432dabd1b84f0604fb651 100644
--- a/Source/devtools/front_end/sdk/DOMModel.js
+++ b/Source/devtools/front_end/sdk/DOMModel.js
@@ -1746,19 +1746,18 @@ WebInspector.DOMModel.prototype = {
},
/**
- * @param {boolean} enabled
- * @param {boolean} inspectUAShadowDOM
+ * @param {!DOMAgent.InspectMode} mode
* @param {function(?Protocol.Error)=} callback
*/
- setInspectModeEnabled: function(enabled, inspectUAShadowDOM, callback)
+ setInspectMode: function(mode, callback)
{
/**
* @this {WebInspector.DOMModel}
*/
function onDocumentAvailable()
{
- this.dispatchEventToListeners(WebInspector.DOMModel.Events.InspectModeWillBeToggled, enabled);
- this._highlighter.setInspectModeEnabled(enabled, inspectUAShadowDOM, this._buildHighlightConfig(), callback);
+ this.dispatchEventToListeners(WebInspector.DOMModel.Events.InspectModeWillBeToggled, mode !== DOMAgent.InspectMode.None);
+ this._highlighter.setInspectMode(mode, this._buildHighlightConfig(), callback);
}
this.requestDocument(onDocumentAvailable.bind(this));
},
@@ -2101,12 +2100,11 @@ WebInspector.DOMNodeHighlighter.prototype = {
highlightDOMNode: function(node, config, backendNodeId, objectId) {},
/**
- * @param {boolean} enabled
- * @param {boolean} inspectUAShadowDOM
+ * @param {!DOMAgent.InspectMode} mode
* @param {!DOMAgent.HighlightConfig} config
* @param {function(?Protocol.Error)=} callback
*/
- setInspectModeEnabled: function(enabled, inspectUAShadowDOM, config, callback) {},
+ setInspectMode: function(mode, config, callback) {},
/**
* @param {!PageAgent.FrameId} frameId
@@ -2142,14 +2140,13 @@ WebInspector.DefaultDOMNodeHighlighter.prototype = {
/**
* @override
- * @param {boolean} enabled
- * @param {boolean} inspectUAShadowDOM
+ * @param {!DOMAgent.InspectMode} mode
* @param {!DOMAgent.HighlightConfig} config
* @param {function(?Protocol.Error)=} callback
*/
- setInspectModeEnabled: function(enabled, inspectUAShadowDOM, config, callback)
+ setInspectMode: function(mode, config, callback)
{
- this._agent.setInspectModeEnabled(enabled, inspectUAShadowDOM, config, callback);
+ this._agent.setInspectMode(mode, config, callback);
},
/**
« no previous file with comments | « Source/devtools/front_end/screencast/ScreencastView.js ('k') | Source/devtools/protocol.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698