Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(91)

Side by Side Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 2748463003: Generalize the HIT_TEST accessibility action so that it can send any event. (Closed)
Patch Set: Add automation API binding and test Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 2073 matching lines...) Expand 10 before | Expand all | Expand 10 after
2084 if (manager) { 2084 if (manager) {
2085 manager->OnFindInPageResult( 2085 manager->OnFindInPageResult(
2086 params.request_id, params.match_index, params.start_id, 2086 params.request_id, params.match_index, params.start_id,
2087 params.start_offset, params.end_id, params.end_offset); 2087 params.start_offset, params.end_id, params.end_offset);
2088 } 2088 }
2089 } 2089 }
2090 } 2090 }
2091 2091
2092 void RenderFrameHostImpl::OnAccessibilityChildFrameHitTestResult( 2092 void RenderFrameHostImpl::OnAccessibilityChildFrameHitTestResult(
2093 const gfx::Point& point, 2093 const gfx::Point& point,
2094 int hit_obj_id) { 2094 int hit_obj_id,
2095 ui::AXEvent event_to_fire) {
2095 if (browser_accessibility_manager_) { 2096 if (browser_accessibility_manager_) {
2096 browser_accessibility_manager_->OnChildFrameHitTestResult(point, 2097 browser_accessibility_manager_->OnChildFrameHitTestResult(point, hit_obj_id,
2097 hit_obj_id); 2098 event_to_fire);
2098 } 2099 }
2099 } 2100 }
2100 2101
2101 void RenderFrameHostImpl::OnAccessibilitySnapshotResponse( 2102 void RenderFrameHostImpl::OnAccessibilitySnapshotResponse(
2102 int callback_id, 2103 int callback_id,
2103 const AXContentTreeUpdate& snapshot) { 2104 const AXContentTreeUpdate& snapshot) {
2104 const auto& it = ax_tree_snapshot_callbacks_.find(callback_id); 2105 const auto& it = ax_tree_snapshot_callbacks_.find(callback_id);
2105 if (it != ax_tree_snapshot_callbacks_.end()) { 2106 if (it != ax_tree_snapshot_callbacks_.end()) {
2106 ui::AXTreeUpdate dst_snapshot; 2107 ui::AXTreeUpdate dst_snapshot;
2107 dst_snapshot.root_id = snapshot.root_id; 2108 dst_snapshot.root_id = snapshot.root_id;
(...skipping 1390 matching lines...) Expand 10 before | Expand all | Expand 10 after
3498 GetUserData(kRenderFrameHostAndroidKey)); 3499 GetUserData(kRenderFrameHostAndroidKey));
3499 if (!render_frame_host_android) { 3500 if (!render_frame_host_android) {
3500 render_frame_host_android = new RenderFrameHostAndroid(this); 3501 render_frame_host_android = new RenderFrameHostAndroid(this);
3501 SetUserData(kRenderFrameHostAndroidKey, render_frame_host_android); 3502 SetUserData(kRenderFrameHostAndroidKey, render_frame_host_android);
3502 } 3503 }
3503 return render_frame_host_android->GetJavaObject(); 3504 return render_frame_host_android->GetJavaObject();
3504 } 3505 }
3505 #endif 3506 #endif
3506 3507
3507 } // namespace content 3508 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698