Remove deprecated options check in BrowserWindow
This commit is contained in:
parent
0342db9328
commit
6f0471f6cb
2 changed files with 1 additions and 72 deletions
|
@ -52,11 +52,6 @@ namespace api {
|
|||
|
||||
namespace {
|
||||
|
||||
// This function is implemented in JavaScript
|
||||
using DeprecatedOptionsCheckCallback =
|
||||
base::Callback<std::string(v8::Local<v8::Value>)>;
|
||||
DeprecatedOptionsCheckCallback g_deprecated_options_check;
|
||||
|
||||
void OnCapturePageDone(
|
||||
v8::Isolate* isolate,
|
||||
const base::Callback<void(const gfx::Image&)>& callback,
|
||||
|
@ -304,13 +299,6 @@ mate::WrappableBase* Window::New(v8::Isolate* isolate, mate::Arguments* args) {
|
|||
options = mate::Dictionary::CreateEmpty(isolate);
|
||||
}
|
||||
|
||||
std::string deprecation_message = g_deprecated_options_check.Run(
|
||||
options.GetHandle());
|
||||
if (deprecation_message.length() > 0) {
|
||||
args->ThrowError(deprecation_message);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return new Window(isolate, options);
|
||||
}
|
||||
|
||||
|
@ -822,10 +810,6 @@ v8::Local<v8::Value> Window::From(v8::Isolate* isolate,
|
|||
return v8::Null(isolate);
|
||||
}
|
||||
|
||||
void SetDeprecatedOptionsCheck(const DeprecatedOptionsCheckCallback& callback) {
|
||||
g_deprecated_options_check = callback;
|
||||
}
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace atom
|
||||
|
@ -848,8 +832,6 @@ void Initialize(v8::Local<v8::Object> exports, v8::Local<v8::Value> unused,
|
|||
|
||||
mate::Dictionary dict(isolate, exports);
|
||||
dict.Set("BrowserWindow", browser_window);
|
||||
dict.SetMethod("_setDeprecatedOptionsCheck",
|
||||
&atom::api::SetDeprecatedOptionsCheck);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue