Make Menu API accept TopLevelWindow

This commit is contained in:
Cheng Zhao 2018-04-17 17:14:49 +09:00
parent 1340b17424
commit 7473b612c5
10 changed files with 41 additions and 40 deletions

View file

@ -118,27 +118,4 @@ class BrowserWindow : public TopLevelWindow,
} // namespace atom
namespace mate {
template <>
struct Converter<atom::NativeWindow*> {
static bool FromV8(v8::Isolate* isolate,
v8::Local<v8::Value> val,
atom::NativeWindow** out) {
// null would be tranfered to NULL.
if (val->IsNull()) {
*out = NULL;
return true;
}
atom::api::BrowserWindow* window;
if (!Converter<atom::api::BrowserWindow*>::FromV8(isolate, val, &window))
return false;
*out = window->window();
return true;
}
};
} // namespace mate
#endif // ATOM_BROWSER_API_ATOM_API_BROWSER_WINDOW_H_