OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/renderer_host/render_view_host_impl.h" | 5 #include "content/browser/renderer_host/render_view_host_impl.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 1926 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1937 | 1937 |
1938 // The rest of this code is just for testing; bail out if we're not | 1938 // The rest of this code is just for testing; bail out if we're not |
1939 // in that mode. | 1939 // in that mode. |
1940 if (accessibility_testing_callback_.is_null()) | 1940 if (accessibility_testing_callback_.is_null()) |
1941 return; | 1941 return; |
1942 | 1942 |
1943 for (unsigned i = 0; i < params.size(); i++) { | 1943 for (unsigned i = 0; i < params.size(); i++) { |
1944 const AccessibilityHostMsg_EventParams& param = params[i]; | 1944 const AccessibilityHostMsg_EventParams& param = params[i]; |
1945 if (static_cast<int>(param.event_type) < 0) | 1945 if (static_cast<int>(param.event_type) < 0) |
1946 continue; | 1946 continue; |
1947 ui::AXTreeUpdate update; | |
1948 update.nodes = param.nodes; | |
1949 if (!ax_tree_) | 1947 if (!ax_tree_) |
1950 ax_tree_.reset(new ui::AXTree(update)); | 1948 ax_tree_.reset(new ui::AXTree(param.update)); |
1951 else | 1949 else |
1952 CHECK(ax_tree_->Unserialize(update)) << ax_tree_->error(); | 1950 CHECK(ax_tree_->Unserialize(param.update)) << ax_tree_->error(); |
1953 accessibility_testing_callback_.Run(param.event_type); | 1951 accessibility_testing_callback_.Run(param.event_type); |
1954 } | 1952 } |
1955 } | 1953 } |
1956 | 1954 |
1957 void RenderViewHostImpl::OnAccessibilityLocationChanges( | 1955 void RenderViewHostImpl::OnAccessibilityLocationChanges( |
1958 const std::vector<AccessibilityHostMsg_LocationChangeParams>& params) { | 1956 const std::vector<AccessibilityHostMsg_LocationChangeParams>& params) { |
1959 if (view_ && IsRVHStateActive(rvh_state_)) { | 1957 if (view_ && IsRVHStateActive(rvh_state_)) { |
1960 view_->CreateBrowserAccessibilityManagerIfNeeded(); | 1958 view_->CreateBrowserAccessibilityManagerIfNeeded(); |
1961 BrowserAccessibilityManager* manager = | 1959 BrowserAccessibilityManager* manager = |
1962 view_->GetBrowserAccessibilityManager(); | 1960 view_->GetBrowserAccessibilityManager(); |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2099 void RenderViewHostImpl::AttachToFrameTree() { | 2097 void RenderViewHostImpl::AttachToFrameTree() { |
2100 FrameTree* frame_tree = delegate_->GetFrameTree(); | 2098 FrameTree* frame_tree = delegate_->GetFrameTree(); |
2101 | 2099 |
2102 frame_tree->ResetForMainFrameSwap(); | 2100 frame_tree->ResetForMainFrameSwap(); |
2103 if (main_frame_id() != FrameTreeNode::kInvalidFrameId) { | 2101 if (main_frame_id() != FrameTreeNode::kInvalidFrameId) { |
2104 frame_tree->OnFirstNavigationAfterSwap(main_frame_id()); | 2102 frame_tree->OnFirstNavigationAfterSwap(main_frame_id()); |
2105 } | 2103 } |
2106 } | 2104 } |
2107 | 2105 |
2108 } // namespace content | 2106 } // namespace content |
OLD | NEW |