feat: add TopLevelWindow.setContentView API
This commit is contained in:
parent
2b24b26e59
commit
bb2715e7a5
10 changed files with 56 additions and 18 deletions
|
@ -42,4 +42,21 @@ class View : public mate::EventEmitter<View> {
|
|||
|
||||
} // namespace atom
|
||||
|
||||
namespace mate {
|
||||
|
||||
template <>
|
||||
struct Converter<views::View*> {
|
||||
static bool FromV8(v8::Isolate* isolate,
|
||||
v8::Local<v8::Value> val,
|
||||
views::View** out) {
|
||||
atom::api::View* view;
|
||||
if (!Converter<atom::api::View*>::FromV8(isolate, val, &view))
|
||||
return false;
|
||||
*out = view->view();
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace mate
|
||||
|
||||
#endif // ATOM_BROWSER_API_ATOM_API_VIEW_H_
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue