Convert ax_enums.idl to mojom.

https://chromium-review.googlesource.com/c/chromium/src/+/877417
This commit is contained in:
deepak1556 2018-04-11 20:45:22 +05:30 committed by Samuel Attard
parent 7732da41ba
commit 2047929cb5
3 changed files with 8 additions and 7 deletions

View file

@ -19,7 +19,7 @@
namespace atom { namespace atom {
void AutofillPopupChildView::GetAccessibleNodeData(ui::AXNodeData* node_data) { void AutofillPopupChildView::GetAccessibleNodeData(ui::AXNodeData* node_data) {
node_data->role = ui::AX_ROLE_MENU_ITEM; node_data->role = ax::mojom::Role::kMenuItem;
node_data->SetName(suggestion_); node_data->SetName(suggestion_);
} }
@ -98,7 +98,7 @@ void AutofillPopupView::Show() {
auto* host = popup_->frame_host_->GetRenderViewHost()->GetWidget(); auto* host = popup_->frame_host_->GetRenderViewHost()->GetWidget();
host->AddKeyPressEventCallback(keypress_callback_); host->AddKeyPressEventCallback(keypress_callback_);
NotifyAccessibilityEvent(ui::AX_EVENT_MENU_START, true); NotifyAccessibilityEvent(ax::mojom::Event::kMenuStart, true);
} }
void AutofillPopupView::Hide() { void AutofillPopupView::Hide() {
@ -109,7 +109,7 @@ void AutofillPopupView::Hide() {
} }
RemoveObserver(); RemoveObserver();
NotifyAccessibilityEvent(ui::AX_EVENT_MENU_END, true); NotifyAccessibilityEvent(ax::mojom::Event::kMenuEnd, true);
if (GetWidget()) { if (GetWidget()) {
GetWidget()->Close(); GetWidget()->Close();
@ -152,7 +152,8 @@ void AutofillPopupView::OnSelectedRowChanged(
int selected = current_row_selection.value_or(-1); int selected = current_row_selection.value_or(-1);
if (selected == -1 || selected >= child_count()) if (selected == -1 || selected >= child_count())
return; return;
child_at(selected)->NotifyAccessibilityEvent(ui::AX_EVENT_SELECTION, true); child_at(selected)->NotifyAccessibilityEvent(ax::mojom::Event::kSelection,
true);
} }
} }
@ -260,7 +261,7 @@ void AutofillPopupView::OnPaint(gfx::Canvas* canvas) {
} }
void AutofillPopupView::GetAccessibleNodeData(ui::AXNodeData* node_data) { void AutofillPopupView::GetAccessibleNodeData(ui::AXNodeData* node_data) {
node_data->role = ui::AX_ROLE_MENU; node_data->role = ax::mojom::Role::kMenu;
node_data->SetName("Autofill Menu"); node_data->SetName("Autofill Menu");
} }

View file

@ -46,7 +46,7 @@ bool ViewsDelegate::GetSavedWindowPlacement(
} }
void ViewsDelegate::NotifyAccessibilityEvent(views::View* view, void ViewsDelegate::NotifyAccessibilityEvent(views::View* view,
ui::AXEvent event_type) {} ax::mojom::Event event_type) {}
void ViewsDelegate::NotifyMenuItemFocused(const base::string16& menu_name, void ViewsDelegate::NotifyMenuItemFocused(const base::string16& menu_name,
const base::string16& menu_item_name, const base::string16& menu_item_name,

View file

@ -28,7 +28,7 @@ class ViewsDelegate : public views::ViewsDelegate {
gfx::Rect* bounds, gfx::Rect* bounds,
ui::WindowShowState* show_state) const override; ui::WindowShowState* show_state) const override;
void NotifyAccessibilityEvent(views::View* view, void NotifyAccessibilityEvent(views::View* view,
ui::AXEvent event_type) override; ax::mojom::Event event_type) override;
void NotifyMenuItemFocused(const base::string16& menu_name, void NotifyMenuItemFocused(const base::string16& menu_name,
const base::string16& menu_item_name, const base::string16& menu_item_name,
int item_index, int item_index,