refactor: simplify Converter<content::PermissionType>::ToV8 (#21053)
This commit is contained in:
parent
601cc6e887
commit
739b20bd13
1 changed files with 10 additions and 10 deletions
|
@ -191,17 +191,17 @@ v8::Local<v8::Value> Converter<content::PermissionType>::ToV8(
|
|||
break;
|
||||
}
|
||||
|
||||
if (val == static_cast<content::PermissionType>(PermissionType::POINTER_LOCK))
|
||||
switch (static_cast<PermissionType>(val)) {
|
||||
case PermissionType::POINTER_LOCK:
|
||||
return StringToV8(isolate, "pointerLock");
|
||||
else if (val ==
|
||||
static_cast<content::PermissionType>(PermissionType::FULLSCREEN))
|
||||
case PermissionType::FULLSCREEN:
|
||||
return StringToV8(isolate, "fullscreen");
|
||||
else if (val ==
|
||||
static_cast<content::PermissionType>(PermissionType::OPEN_EXTERNAL))
|
||||
case PermissionType::OPEN_EXTERNAL:
|
||||
return StringToV8(isolate, "openExternal");
|
||||
|
||||
default:
|
||||
return StringToV8(isolate, "unknown");
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
bool Converter<content::StopFindAction>::FromV8(v8::Isolate* isolate,
|
||||
|
|
Loading…
Reference in a new issue