chore: remove unused classes of views API (#22861)
* chore: remove unused views API classes * chore: remove LayoutManager code * chore: no more need to make View inherit from TrackabeObject * chore: make enable_view_api default to true * chore: enable_view_api => enable_views_api
This commit is contained in:
parent
d5cae424d8
commit
76ae3b7ecb
31 changed files with 16 additions and 948 deletions
|
@ -42,12 +42,6 @@ module.exports = [
|
|||
|
||||
if (features.isViewApiEnabled()) {
|
||||
module.exports.push(
|
||||
{ name: 'BoxLayout' },
|
||||
{ name: 'Button' },
|
||||
{ name: 'LabelButton' },
|
||||
{ name: 'LayoutManager' },
|
||||
{ name: 'MdTextButton' },
|
||||
{ name: 'ResizeArea' },
|
||||
{ name: 'TextField' }
|
||||
{ name: 'ImageView' }
|
||||
);
|
||||
}
|
||||
|
|
|
@ -37,13 +37,6 @@ export const browserModuleList: ElectronInternal.ModuleEntry[] = [
|
|||
|
||||
if (features.isViewApiEnabled()) {
|
||||
browserModuleList.push(
|
||||
{ name: 'BoxLayout', loader: () => require('./views/box-layout') },
|
||||
{ name: 'Button', loader: () => require('./views/button') },
|
||||
{ name: 'ImageView', loader: () => require('./views/image-view') },
|
||||
{ name: 'LabelButton', loader: () => require('./views/label-button') },
|
||||
{ name: 'LayoutManager', loader: () => require('./views/layout-manager') },
|
||||
{ name: 'MdTextButton', loader: () => require('./views/md-text-button') },
|
||||
{ name: 'ResizeArea', loader: () => require('./views/resize-area') },
|
||||
{ name: 'TextField', loader: () => require('./views/text-field') }
|
||||
{ name: 'ImageView', loader: () => require('./views/image-view') }
|
||||
);
|
||||
}
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
const electron = require('electron');
|
||||
|
||||
const { LayoutManager } = electron;
|
||||
const { BoxLayout } = process.electronBinding('box_layout');
|
||||
|
||||
Object.setPrototypeOf(BoxLayout.prototype, LayoutManager.prototype);
|
||||
|
||||
BoxLayout.prototype._init = function () {
|
||||
// Call parent class's _init.
|
||||
LayoutManager.prototype._init.call(this);
|
||||
};
|
||||
|
||||
module.exports = BoxLayout;
|
|
@ -1,15 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
const electron = require('electron');
|
||||
|
||||
const { View } = electron;
|
||||
const { Button } = process.electronBinding('button');
|
||||
|
||||
Object.setPrototypeOf(Button.prototype, View.prototype);
|
||||
|
||||
Button.prototype._init = function () {
|
||||
// Call parent class's _init.
|
||||
View.prototype._init.call(this);
|
||||
};
|
||||
|
||||
module.exports = Button;
|
|
@ -1,15 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
const electron = require('electron');
|
||||
|
||||
const { Button } = electron;
|
||||
const { LabelButton } = process.electronBinding('label_button');
|
||||
|
||||
Object.setPrototypeOf(LabelButton.prototype, Button.prototype);
|
||||
|
||||
LabelButton.prototype._init = function () {
|
||||
// Call parent class's _init.
|
||||
Button.prototype._init.call(this);
|
||||
};
|
||||
|
||||
module.exports = LabelButton;
|
|
@ -1,8 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
const { LayoutManager } = process.electronBinding('layout_manager');
|
||||
|
||||
LayoutManager.prototype._init = function () {
|
||||
};
|
||||
|
||||
module.exports = LayoutManager;
|
|
@ -1,15 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
const electron = require('electron');
|
||||
|
||||
const { LabelButton } = electron;
|
||||
const { MdTextButton } = process.electronBinding('md_text_button');
|
||||
|
||||
Object.setPrototypeOf(MdTextButton.prototype, LabelButton.prototype);
|
||||
|
||||
MdTextButton.prototype._init = function () {
|
||||
// Call parent class's _init.
|
||||
LabelButton.prototype._init.call(this);
|
||||
};
|
||||
|
||||
module.exports = MdTextButton;
|
|
@ -1,15 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
const electron = require('electron');
|
||||
|
||||
const { View } = electron;
|
||||
const { ResizeArea } = process.electronBinding('resize_area');
|
||||
|
||||
Object.setPrototypeOf(ResizeArea.prototype, View.prototype);
|
||||
|
||||
ResizeArea.prototype._init = function () {
|
||||
// Call parent class's _init.
|
||||
View.prototype._init.call(this);
|
||||
};
|
||||
|
||||
module.exports = ResizeArea;
|
|
@ -1,15 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
const electron = require('electron');
|
||||
|
||||
const { View } = electron;
|
||||
const { TextField } = process.electronBinding('text_field');
|
||||
|
||||
Object.setPrototypeOf(TextField.prototype, View.prototype);
|
||||
|
||||
TextField.prototype._init = function () {
|
||||
// Call parent class's _init.
|
||||
View.prototype._init.call(this);
|
||||
};
|
||||
|
||||
module.exports = TextField;
|
Loading…
Add table
Add a link
Reference in a new issue