mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 993101 - Add main-process debug button. r=paul
This commit is contained in:
parent
ca5c8f2349
commit
21876b71a3
@ -122,6 +122,14 @@ let UI = {
|
||||
this.setWallpaper(dataURL);
|
||||
});
|
||||
});
|
||||
if (Services.prefs.getBoolPref("devtools.chrome.enabled")) {
|
||||
let rootButton = document.getElementById("root-actor-debug");
|
||||
if (response.consoleActor) {
|
||||
rootButton.removeAttribute("hidden");
|
||||
} else {
|
||||
rootButton.setAttribute("hidden", "true");
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
@ -143,6 +151,21 @@ let UI = {
|
||||
if (panel) panel.classList.add("selected");
|
||||
},
|
||||
|
||||
openToolboxForRootActor: function() {
|
||||
if (!this.connected) {
|
||||
return;
|
||||
}
|
||||
|
||||
let options = {
|
||||
form: this.listTabsResponse,
|
||||
client: this.connection.client,
|
||||
chrome: true
|
||||
};
|
||||
devtools.TargetFactory.forRemoteTab(options).then((target) => {
|
||||
top.UI.openAndShowToolboxForTarget(target, "Main process", null);
|
||||
});
|
||||
},
|
||||
|
||||
openToolboxForApp: function(manifest) {
|
||||
if (!this.connected) {
|
||||
return;
|
||||
|
@ -35,6 +35,7 @@
|
||||
<span template='{"type":"textContent","path":"device.description.geckoversion"}'></span>
|
||||
</h3>
|
||||
<p template='{"type":"localizedContent","property":"device.deviceSize", "paths":["device.description.width","device.description.height","device.description.dpi"]}'></p>
|
||||
<button id="root-actor-debug" hidden="true" onclick="UI.openToolboxForRootActor()" title="&device.debugMainProcessTooltip;">&device.debugMainProcess;</button>
|
||||
</header>
|
||||
<div id="tabs-headers">
|
||||
<div onclick="UI.setTab('apps')" class="tab sidebar-item apps" title="&device.installedAppsTooltip;">&device.installedApps;</div>
|
||||
|
@ -7,6 +7,8 @@
|
||||
<!ENTITY index.device2 "Device">
|
||||
<!ENTITY index.help "Help">
|
||||
|
||||
<!ENTITY device.debugMainProcess "Debug main process">
|
||||
<!ENTITY device.debugMainProcessTooltip "Open the Developer Tools connected to the main process on the device">
|
||||
<!ENTITY device.screenshot "Screenshot">
|
||||
<!ENTITY device.screenshotTooltip "Open a screenshot of the current state of the device in a new tab">
|
||||
<!ENTITY device.title "Device Control Center">
|
||||
|
@ -58,6 +58,9 @@ h1 {
|
||||
}
|
||||
|
||||
|
||||
#root-actor-debug {
|
||||
background: white;
|
||||
}
|
||||
|
||||
/***************** APP BUTTONS *****************/
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user