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;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (val == static_cast<content::PermissionType>(PermissionType::POINTER_LOCK))
|
switch (static_cast<PermissionType>(val)) {
|
||||||
|
case PermissionType::POINTER_LOCK:
|
||||||
return StringToV8(isolate, "pointerLock");
|
return StringToV8(isolate, "pointerLock");
|
||||||
else if (val ==
|
case PermissionType::FULLSCREEN:
|
||||||
static_cast<content::PermissionType>(PermissionType::FULLSCREEN))
|
|
||||||
return StringToV8(isolate, "fullscreen");
|
return StringToV8(isolate, "fullscreen");
|
||||||
else if (val ==
|
case PermissionType::OPEN_EXTERNAL:
|
||||||
static_cast<content::PermissionType>(PermissionType::OPEN_EXTERNAL))
|
|
||||||
return StringToV8(isolate, "openExternal");
|
return StringToV8(isolate, "openExternal");
|
||||||
|
default:
|
||||||
return StringToV8(isolate, "unknown");
|
return StringToV8(isolate, "unknown");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
bool Converter<content::StopFindAction>::FromV8(v8::Isolate* isolate,
|
bool Converter<content::StopFindAction>::FromV8(v8::Isolate* isolate,
|
||||||
|
|
Loading…
Reference in a new issue