refactor: MenuItemType was moved to mojom

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2071443
This commit is contained in:
Samuel Attard 2021-03-05 15:36:52 -08:00
Родитель 0d94e0d1d9
Коммит 1a296e59c2
2 изменённых файлов: 9 добавлений и 10 удалений

Просмотреть файл

@ -110,19 +110,19 @@ struct Converter<ui::MenuSourceType> {
};
// static
v8::Local<v8::Value> Converter<blink::MenuItem::Type>::ToV8(
v8::Local<v8::Value> Converter<blink::mojom::MenuItem::Type>::ToV8(
v8::Isolate* isolate,
const blink::MenuItem::Type& val) {
const blink::mojom::MenuItem::Type& val) {
switch (val) {
case blink::MenuItem::CHECKABLE_OPTION:
case blink::mojom::MenuItem::Type::kCheckableOption:
return StringToV8(isolate, "checkbox");
case blink::MenuItem::GROUP:
case blink::mojom::MenuItem::Type::kGroup:
return StringToV8(isolate, "radio");
case blink::MenuItem::SEPARATOR:
case blink::mojom::MenuItem::Type::kSeparator:
return StringToV8(isolate, "separator");
case blink::MenuItem::SUBMENU:
case blink::mojom::MenuItem::Type::kSubMenu:
return StringToV8(isolate, "submenu");
case blink::MenuItem::OPTION:
case blink::mojom::MenuItem::Type::kOption:
default:
return StringToV8(isolate, "normal");
}

Просмотреть файл

@ -11,7 +11,6 @@
#include "content/public/common/referrer.h"
#include "content/public/common/stop_find_action.h"
#include "gin/converter.h"
#include "third_party/blink/public/common/context_menu_data/menu_item.h"
#include "third_party/blink/public/mojom/permissions/permission_status.mojom.h"
namespace content {
@ -26,9 +25,9 @@ using ContextMenuParamsWithWebContents =
namespace gin {
template <>
struct Converter<blink::MenuItem::Type> {
struct Converter<blink::mojom::MenuItem::Type> {
static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
const blink::MenuItem::Type& val);
const blink::mojom::MenuItem::Type& val);
};
template <>