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

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

Issue 2493373002: DevTools: rename WebInspector into modules. (Closed)
Patch Set: for bots Created 4 years, 1 month 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 /* eslint-disable indent */ 4 /* eslint-disable indent */
5 (function(window) { 5 (function(window) {
6 6
7 // DevToolsAPI --------------------------------------------------------------- - 7 // DevToolsAPI --------------------------------------------------------------- -
8 8
9 /** 9 /**
10 * @unrestricted 10 * @unrestricted
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 inspectorFrontendAPI[method].apply(inspectorFrontendAPI, args); 57 inspectorFrontendAPI[method].apply(inspectorFrontendAPI, args);
58 } 58 }
59 59
60 // API methods below this line -------------------------------------------- 60 // API methods below this line --------------------------------------------
61 61
62 /** 62 /**
63 * @param {!Array.<!ExtensionDescriptor>} extensions 63 * @param {!Array.<!ExtensionDescriptor>} extensions
64 */ 64 */
65 addExtensions(extensions) { 65 addExtensions(extensions) {
66 // Support for legacy front-ends (<M41). 66 // Support for legacy front-ends (<M41).
67 if (window['WebInspector']['addExtensions']) 67 if (window['WebInspector'] && window['WebInspector']['addExtensions'])
68 window['WebInspector']['addExtensions'](extensions); 68 window['WebInspector']['addExtensions'](extensions);
69 else 69 else
70 this._dispatchOnInspectorFrontendAPI('addExtensions', [extensions]); 70 this._dispatchOnInspectorFrontendAPI('addExtensions', [extensions]);
71 } 71 }
72 72
73 /** 73 /**
74 * @param {string} url 74 * @param {string} url
75 */ 75 */
76 appendedToURL(url) { 76 appendedToURL(url) {
77 this._dispatchOnInspectorFrontendAPI('appendedToURL', [url]); 77 this._dispatchOnInspectorFrontendAPI('appendedToURL', [url]);
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 */ 245 */
246 searchCompleted(requestId, fileSystemPath, files) { 246 searchCompleted(requestId, fileSystemPath, files) {
247 this._dispatchOnInspectorFrontendAPI('searchCompleted', [requestId, fileSy stemPath, files]); 247 this._dispatchOnInspectorFrontendAPI('searchCompleted', [requestId, fileSy stemPath, files]);
248 } 248 }
249 249
250 /** 250 /**
251 * @param {string} tabId 251 * @param {string} tabId
252 */ 252 */
253 setInspectedTabId(tabId) { 253 setInspectedTabId(tabId) {
254 // Support for legacy front-ends (<M41). 254 // Support for legacy front-ends (<M41).
255 if (window['WebInspector']['setInspectedTabId']) 255 if (window['WebInspector'] && window['WebInspector']['setInspectedTabId'])
256 window['WebInspector']['setInspectedTabId'](tabId); 256 window['WebInspector']['setInspectedTabId'](tabId);
257 else 257 else
258 this._dispatchOnInspectorFrontendAPI('setInspectedTabId', [tabId]); 258 this._dispatchOnInspectorFrontendAPI('setInspectedTabId', [tabId]);
259 } 259 }
260 260
261 /** 261 /**
262 * @param {boolean} useSoftMenu 262 * @param {boolean} useSoftMenu
263 */ 263 */
264 setUseSoftMenu(useSoftMenu) { 264 setUseSoftMenu(useSoftMenu) {
265 this._dispatchOnInspectorFrontendAPI('setUseSoftMenu', [useSoftMenu]); 265 this._dispatchOnInspectorFrontendAPI('setUseSoftMenu', [useSoftMenu]);
(...skipping 965 matching lines...) Expand 10 before | Expand all | Expand 10 after
1231 * @return {boolean} 1231 * @return {boolean}
1232 */ 1232 */
1233 DOMTokenList.prototype.toggle = function(token, force) { 1233 DOMTokenList.prototype.toggle = function(token, force) {
1234 if (arguments.length === 1) 1234 if (arguments.length === 1)
1235 force = !this.contains(token); 1235 force = !this.contains(token);
1236 return this.__originalDOMTokenListToggle(token, !!force); 1236 return this.__originalDOMTokenListToggle(token, !!force);
1237 }; 1237 };
1238 } 1238 }
1239 1239
1240 })(window); 1240 })(window);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698