mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 00:05:36 +00:00
Bug 1471795 - Part 2: Introduce Runtime class. r=jdescottes
MozReview-Commit-ID: EajaVnn9kR3 --HG-- extra : rebase_source : c682161aa226880bb17efe342f144a87458e55cf
This commit is contained in:
parent
6db8153aa8
commit
e41d8f7704
@ -17,6 +17,8 @@ const { createFactory } =
|
||||
const { render, unmountComponentAtNode } =
|
||||
require("devtools/client/shared/vendor/react-dom");
|
||||
|
||||
const ThisFirefox = require("./src/runtimes/this-firefox");
|
||||
|
||||
const App = createFactory(require("./src/components/App"));
|
||||
|
||||
const AboutDebugging = {
|
||||
@ -27,7 +29,8 @@ const AboutDebugging = {
|
||||
return;
|
||||
}
|
||||
|
||||
render(App(), this.mount);
|
||||
const thisFirefox = new ThisFirefox();
|
||||
render(App({ thisFirefox }), this.mount);
|
||||
},
|
||||
|
||||
destroy() {
|
||||
|
@ -6,8 +6,17 @@
|
||||
|
||||
const { PureComponent } = require("devtools/client/shared/vendor/react");
|
||||
const dom = require("devtools/client/shared/vendor/react-dom-factories");
|
||||
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
|
||||
|
||||
const ThisFirefox = require("../runtimes/this-firefox");
|
||||
|
||||
class App extends PureComponent {
|
||||
static get propTypes() {
|
||||
return {
|
||||
thisFirefox: PropTypes.instanceOf(ThisFirefox).isRequired,
|
||||
};
|
||||
}
|
||||
|
||||
render() {
|
||||
return dom.div(
|
||||
{
|
||||
|
@ -4,4 +4,5 @@
|
||||
|
||||
DIRS += [
|
||||
'components',
|
||||
'runtimes',
|
||||
]
|
||||
|
@ -0,0 +1,8 @@
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
DevToolsModules(
|
||||
'runtime.js',
|
||||
'this-firefox.js',
|
||||
)
|
13
devtools/client/aboutdebugging-new/src/runtimes/runtime.js
Normal file
13
devtools/client/aboutdebugging-new/src/runtimes/runtime.js
Normal file
@ -0,0 +1,13 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* This class represents a runtime, such as a remote Firefox.
|
||||
*/
|
||||
class Runtime {
|
||||
}
|
||||
|
||||
module.exports = Runtime;
|
@ -0,0 +1,16 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
"use strict";
|
||||
|
||||
const Runtime = require("./runtime");
|
||||
|
||||
/**
|
||||
* This class represents the Firefox instance which runs in the same environment that
|
||||
* opened about:debugging.
|
||||
*/
|
||||
class ThisFirefox extends Runtime {
|
||||
}
|
||||
|
||||
module.exports = ThisFirefox;
|
Loading…
Reference in New Issue
Block a user