OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/browser/frame_host/render_frame_host_impl.h" | 5 #include "content/browser/frame_host/render_frame_host_impl.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/containers/hash_tables.h" | 9 #include "base/containers/hash_tables.h" |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 1325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1336 return; | 1336 return; |
1337 } | 1337 } |
1338 accessibility_reset_token_ = 0; | 1338 accessibility_reset_token_ = 0; |
1339 | 1339 |
1340 RenderWidgetHostViewBase* view = static_cast<RenderWidgetHostViewBase*>( | 1340 RenderWidgetHostViewBase* view = static_cast<RenderWidgetHostViewBase*>( |
1341 render_view_host_->GetView()); | 1341 render_view_host_->GetView()); |
1342 | 1342 |
1343 AccessibilityMode accessibility_mode = delegate_->GetAccessibilityMode(); | 1343 AccessibilityMode accessibility_mode = delegate_->GetAccessibilityMode(); |
1344 if ((accessibility_mode != AccessibilityModeOff) && view && | 1344 if ((accessibility_mode != AccessibilityModeOff) && view && |
1345 RenderFrameHostImpl::IsRFHStateActive(rfh_state())) { | 1345 RenderFrameHostImpl::IsRFHStateActive(rfh_state())) { |
1346 if (accessibility_mode & AccessibilityModeFlagPlatform) { | |
1347 GetOrCreateBrowserAccessibilityManager(); | |
1348 if (browser_accessibility_manager_) | |
1349 browser_accessibility_manager_->OnAccessibilityEvents(params); | |
1350 } | |
1351 | |
1352 if (browser_accessibility_manager_) { | 1346 if (browser_accessibility_manager_) { |
1353 // Get the frame routing ids from out-of-process iframes and | 1347 // Get the frame routing ids from out-of-process iframes and |
1354 // browser plugin instance ids from guests and update the mappings in | 1348 // browser plugin instance ids from guests and update the mappings in |
1355 // FrameAccessibility. | 1349 // FrameAccessibility. |
1356 for (size_t i = 0; i < params.size(); ++i) { | 1350 for (size_t i = 0; i < params.size(); ++i) { |
1357 const AccessibilityHostMsg_EventParams& param = params[i]; | 1351 const AccessibilityHostMsg_EventParams& param = params[i]; |
1358 UpdateCrossProcessIframeAccessibility( | 1352 UpdateCrossProcessIframeAccessibility( |
1359 param.node_to_frame_routing_id_map); | 1353 param.node_to_frame_routing_id_map); |
1360 UpdateGuestFrameAccessibility( | 1354 UpdateGuestFrameAccessibility( |
1361 param.node_to_browser_plugin_instance_id_map); | 1355 param.node_to_browser_plugin_instance_id_map); |
1362 } | 1356 } |
1363 } | 1357 } |
1364 | 1358 |
| 1359 if (accessibility_mode & AccessibilityModeFlagPlatform) { |
| 1360 GetOrCreateBrowserAccessibilityManager(); |
| 1361 if (browser_accessibility_manager_) |
| 1362 browser_accessibility_manager_->OnAccessibilityEvents(params); |
| 1363 } |
| 1364 |
1365 // Send the updates to the automation extension API. | 1365 // Send the updates to the automation extension API. |
1366 std::vector<AXEventNotificationDetails> details; | 1366 std::vector<AXEventNotificationDetails> details; |
1367 details.reserve(params.size()); | 1367 details.reserve(params.size()); |
1368 for (size_t i = 0; i < params.size(); ++i) { | 1368 for (size_t i = 0; i < params.size(); ++i) { |
1369 const AccessibilityHostMsg_EventParams& param = params[i]; | 1369 const AccessibilityHostMsg_EventParams& param = params[i]; |
1370 AXEventNotificationDetails detail(param.update.node_id_to_clear, | 1370 AXEventNotificationDetails detail(param.update.node_id_to_clear, |
1371 param.update.nodes, | 1371 param.update.nodes, |
1372 param.event_type, | 1372 param.event_type, |
1373 param.id, | 1373 param.id, |
1374 GetProcess()->GetID(), | 1374 GetProcess()->GetID(), |
(...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2092 // We may be returning to an existing NavigationEntry that had been granted | 2092 // We may be returning to an existing NavigationEntry that had been granted |
2093 // file access. If this is a different process, we will need to grant the | 2093 // file access. If this is a different process, we will need to grant the |
2094 // access again. The files listed in the page state are validated when they | 2094 // access again. The files listed in the page state are validated when they |
2095 // are received from the renderer to prevent abuse. | 2095 // are received from the renderer to prevent abuse. |
2096 if (request_params.page_state.IsValid()) { | 2096 if (request_params.page_state.IsValid()) { |
2097 render_view_host_->GrantFileAccessFromPageState(request_params.page_state); | 2097 render_view_host_->GrantFileAccessFromPageState(request_params.page_state); |
2098 } | 2098 } |
2099 } | 2099 } |
2100 | 2100 |
2101 } // namespace content | 2101 } // namespace content |
OLD | NEW |