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

Side by Side Diff: content/renderer/accessibility/renderer_accessibility.cc

Issue 1407413002: Move some AX attrs from AXNodeData to AXTreeData. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 2 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 (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/renderer/accessibility/renderer_accessibility.h" 5 #include "content/renderer/accessibility/renderer_accessibility.h"
6 6
7 #include <queue> 7 #include <queue>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 24 matching lines...) Expand all
35 namespace content { 35 namespace content {
36 36
37 // Cap the number of nodes returned in an accessibility 37 // Cap the number of nodes returned in an accessibility
38 // tree snapshot to avoid outrageous memory or bandwidth 38 // tree snapshot to avoid outrageous memory or bandwidth
39 // usage. 39 // usage.
40 const size_t kMaxSnapshotNodeCount = 5000; 40 const size_t kMaxSnapshotNodeCount = 5000;
41 41
42 // static 42 // static
43 void RendererAccessibility::SnapshotAccessibilityTree( 43 void RendererAccessibility::SnapshotAccessibilityTree(
44 RenderFrameImpl* render_frame, 44 RenderFrameImpl* render_frame,
45 ui::AXTreeUpdate<content::AXContentNodeData>* response) { 45 AXContentTreeUpdate* response) {
46 DCHECK(render_frame); 46 DCHECK(render_frame);
47 DCHECK(response); 47 DCHECK(response);
48 if (!render_frame->GetWebFrame()) 48 if (!render_frame->GetWebFrame())
49 return; 49 return;
50 50
51 WebDocument document = render_frame->GetWebFrame()->document(); 51 WebDocument document = render_frame->GetWebFrame()->document();
52 WebScopedAXContext context(document); 52 WebScopedAXContext context(document);
53 BlinkAXTreeSource tree_source(render_frame); 53 BlinkAXTreeSource tree_source(render_frame);
54 tree_source.SetRoot(context.root()); 54 tree_source.SetRoot(context.root());
55 BlinkAXTreeSerializer serializer(&tree_source); 55 BlinkAXTreeSerializer serializer(&tree_source);
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 #ifndef NDEBUG 560 #ifndef NDEBUG
561 LOG(WARNING) << "ShowContextMenu on invalid object id " << acc_obj_id; 561 LOG(WARNING) << "ShowContextMenu on invalid object id " << acc_obj_id;
562 #endif 562 #endif
563 return; 563 return;
564 } 564 }
565 565
566 obj.showContextMenu(); 566 obj.showContextMenu();
567 } 567 }
568 568
569 } // namespace content 569 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698