| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com). | 3 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com). |
| 4 * Copyright (C) 2009 Joseph Pecoraro | 4 * Copyright (C) 2009 Joseph Pecoraro |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * | 9 * |
| 10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 /** | 325 /** |
| 326 * @param {?WebInspector.Target} target | 326 * @param {?WebInspector.Target} target |
| 327 */ | 327 */ |
| 328 _mainTargetCreated: function(target) | 328 _mainTargetCreated: function(target) |
| 329 { | 329 { |
| 330 console.timeStamp("Main._mainTargetCreated"); | 330 console.timeStamp("Main._mainTargetCreated"); |
| 331 this._mainTarget = /** @type {!WebInspector.Target} */(target); | 331 this._mainTarget = /** @type {!WebInspector.Target} */(target); |
| 332 this._registerShortcuts(); | 332 this._registerShortcuts(); |
| 333 | 333 |
| 334 this._mainTarget.registerInspectorDispatcher(this); | 334 this._mainTarget.registerInspectorDispatcher(this); |
| 335 InspectorFrontendHost.events.addEventListener(InspectorFrontendHostAPI.E
vents.ReloadInspectedPage, this._reloadInspectedPage, this); |
| 335 | 336 |
| 336 if (this._mainTarget.isServiceWorker()) | 337 if (this._mainTarget.isServiceWorker()) |
| 337 this._mainTarget.runtimeAgent().run(); | 338 this._mainTarget.runtimeAgent().run(); |
| 338 | 339 |
| 339 WebInspector.overridesSupport.init(this._mainTarget, overridesReady); | 340 WebInspector.overridesSupport.init(this._mainTarget, overridesReady); |
| 340 | 341 |
| 341 function overridesReady() | 342 function overridesReady() |
| 342 { | 343 { |
| 343 if (!WebInspector.dockController.canDock() && WebInspector.overrides
Support.emulationEnabled()) | 344 if (!WebInspector.dockController.canDock() && WebInspector.overrides
Support.emulationEnabled()) |
| 344 WebInspector.inspectorView.showViewInDrawer("emulation", true); | 345 WebInspector.inspectorView.showViewInDrawer("emulation", true); |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 552 document.addEventListener("keydown", this._postDocumentKeyDown.bind(this
), false); | 553 document.addEventListener("keydown", this._postDocumentKeyDown.bind(this
), false); |
| 553 document.addEventListener("beforecopy", this._documentCanCopy.bind(this)
, true); | 554 document.addEventListener("beforecopy", this._documentCanCopy.bind(this)
, true); |
| 554 document.addEventListener("copy", this._documentCopy.bind(this), false); | 555 document.addEventListener("copy", this._documentCopy.bind(this), false); |
| 555 document.addEventListener("cut", this._documentCut.bind(this), false); | 556 document.addEventListener("cut", this._documentCut.bind(this), false); |
| 556 document.addEventListener("paste", this._documentPaste.bind(this), false
); | 557 document.addEventListener("paste", this._documentPaste.bind(this), false
); |
| 557 document.addEventListener("contextmenu", this._contextMenuEventFired.bin
d(this), true); | 558 document.addEventListener("contextmenu", this._contextMenuEventFired.bin
d(this), true); |
| 558 document.addEventListener("click", this._documentClick.bind(this), false
); | 559 document.addEventListener("click", this._documentClick.bind(this), false
); |
| 559 }, | 560 }, |
| 560 | 561 |
| 561 /** | 562 /** |
| 563 * @param {!WebInspector.Event} event |
| 564 */ |
| 565 _reloadInspectedPage: function(event) |
| 566 { |
| 567 var hard = /** @type {boolean} */ (event.data); |
| 568 WebInspector.Main._reloadPage(hard); |
| 569 }, |
| 570 |
| 571 /** |
| 562 * @override | 572 * @override |
| 563 * @param {!RuntimeAgent.RemoteObject} payload | 573 * @param {!RuntimeAgent.RemoteObject} payload |
| 564 * @param {!Object=} hints | 574 * @param {!Object=} hints |
| 565 */ | 575 */ |
| 566 inspect: function(payload, hints) | 576 inspect: function(payload, hints) |
| 567 { | 577 { |
| 568 var object = this._mainTarget.runtimeModel.createRemoteObject(payload); | 578 var object = this._mainTarget.runtimeModel.createRemoteObject(payload); |
| 569 if (object.isNode()) { | 579 if (object.isNode()) { |
| 570 WebInspector.Revealer.revealPromise(object).then(object.release.bind
(object)); | 580 WebInspector.Revealer.revealPromise(object).then(object.release.bind
(object)); |
| 571 return; | 581 return; |
| (...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 928 p.classList.add("help-section"); | 938 p.classList.add("help-section"); |
| 929 p.textContent = WebInspector.UIString("Inspected worker has terminated. Once
it restarts we will attach to it automatically."); | 939 p.textContent = WebInspector.UIString("Inspected worker has terminated. Once
it restarts we will attach to it automatically."); |
| 930 } | 940 } |
| 931 | 941 |
| 932 WebInspector.WorkerTerminatedScreen.prototype = { | 942 WebInspector.WorkerTerminatedScreen.prototype = { |
| 933 | 943 |
| 934 __proto__: WebInspector.HelpScreen.prototype | 944 __proto__: WebInspector.HelpScreen.prototype |
| 935 } | 945 } |
| 936 | 946 |
| 937 new WebInspector.Main(); | 947 new WebInspector.Main(); |
| OLD | NEW |