Commit bf96e5cd authored by Aaron Leventhal's avatar Aaron Leventhal Committed by Commit Bot

Move to anonymous namespace

TBR=nektar@chromium.org

Bug: None
Change-Id: Ie0078dadf64e05ab8c0b9ff53549c4b8a726ad18
Reviewed-on: https://chromium-review.googlesource.com/956295Reviewed-by: default avatarAaron Leventhal <aleventhal@chromium.org>
Commit-Queue: Aaron Leventhal <aleventhal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#542218}
parent f7a01706
......@@ -72,6 +72,31 @@ ui::AXPlatformNode* FromNativeWindow(gfx::NativeWindow native_window) {
return ui::AXPlatformNode::FromNativeViewAccessible(native_view_accessible);
}
ui::AXPlatformNode* PlatformNodeFromNodeID(int32_t id) {
// Note: For Views, node IDs and unique IDs are the same - but that isn't
// necessarily true for all AXPlatformNodes.
auto it = g_unique_id_to_ax_platform_node.Get().find(id);
if (it == g_unique_id_to_ax_platform_node.Get().end())
return nullptr;
return it->second;
}
void FireEvent(QueuedEvent event) {
ui::AXPlatformNode* node = PlatformNodeFromNodeID(event.node_id);
if (node)
node->NotifyAccessibilityEvent(event.type);
}
void FlushQueue() {
DCHECK(g_is_queueing_events);
for (QueuedEvent event : g_event_queue.Get())
FireEvent(event);
g_is_queueing_events = false;
g_event_queue.Get().clear();
}
} // namespace
// static
......@@ -101,31 +126,6 @@ gfx::NativeViewAccessible NativeViewAccessibilityBase::GetNativeObject() {
return ax_node_->GetNativeViewAccessible();
}
ui::AXPlatformNode* PlatformNodeFromNodeID(int32_t id) {
// Note: For Views, node IDs and unique IDs are the same - but that isn't
// necessarily true for all AXPlatformNodes.
auto it = g_unique_id_to_ax_platform_node.Get().find(id);
if (it == g_unique_id_to_ax_platform_node.Get().end())
return nullptr;
return it->second;
}
void FireEvent(QueuedEvent event) {
ui::AXPlatformNode* node = PlatformNodeFromNodeID(event.node_id);
if (node)
node->NotifyAccessibilityEvent(event.type);
}
void FlushQueue() {
DCHECK(g_is_queueing_events);
for (QueuedEvent event : g_event_queue.Get())
FireEvent(event);
g_is_queueing_events = false;
g_event_queue.Get().clear();
}
void NativeViewAccessibilityBase::NotifyAccessibilityEvent(
ax::mojom::Event event_type) {
if (g_is_queueing_events) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment