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

Side by Side Diff: content/renderer/render_frame_impl.cc

Issue 1051923003: Add a WebContentsImpl API to snapshot the accessibility tree. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed some of the feedback Created 5 years, 8 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/renderer/render_frame_impl.h" 5 #include "content/renderer/render_frame_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 1024 matching lines...) Expand 10 before | Expand all | Expand 10 after
1035 OnHideTransitionElements) 1035 OnHideTransitionElements)
1036 IPC_MESSAGE_HANDLER(FrameMsg_ShowTransitionElements, 1036 IPC_MESSAGE_HANDLER(FrameMsg_ShowTransitionElements,
1037 OnShowTransitionElements) 1037 OnShowTransitionElements)
1038 IPC_MESSAGE_HANDLER(FrameMsg_Reload, OnReload) 1038 IPC_MESSAGE_HANDLER(FrameMsg_Reload, OnReload)
1039 IPC_MESSAGE_HANDLER(FrameMsg_TextSurroundingSelectionRequest, 1039 IPC_MESSAGE_HANDLER(FrameMsg_TextSurroundingSelectionRequest,
1040 OnTextSurroundingSelectionRequest) 1040 OnTextSurroundingSelectionRequest)
1041 IPC_MESSAGE_HANDLER(FrameMsg_AddStyleSheetByURL, 1041 IPC_MESSAGE_HANDLER(FrameMsg_AddStyleSheetByURL,
1042 OnAddStyleSheetByURL) 1042 OnAddStyleSheetByURL)
1043 IPC_MESSAGE_HANDLER(FrameMsg_SetAccessibilityMode, 1043 IPC_MESSAGE_HANDLER(FrameMsg_SetAccessibilityMode,
1044 OnSetAccessibilityMode) 1044 OnSetAccessibilityMode)
1045 IPC_MESSAGE_HANDLER(AccessibilityMsg_SnapshotTree,
1046 OnSnapshotAccessibilityTree)
1045 IPC_MESSAGE_HANDLER(FrameMsg_DisownOpener, OnDisownOpener) 1047 IPC_MESSAGE_HANDLER(FrameMsg_DisownOpener, OnDisownOpener)
1046 IPC_MESSAGE_HANDLER(FrameMsg_CommitNavigation, OnCommitNavigation) 1048 IPC_MESSAGE_HANDLER(FrameMsg_CommitNavigation, OnCommitNavigation)
1047 IPC_MESSAGE_HANDLER(FrameMsg_DidUpdateSandboxFlags, OnDidUpdateSandboxFlags) 1049 IPC_MESSAGE_HANDLER(FrameMsg_DidUpdateSandboxFlags, OnDidUpdateSandboxFlags)
1048 #if defined(OS_ANDROID) 1050 #if defined(OS_ANDROID)
1049 IPC_MESSAGE_HANDLER(FrameMsg_SelectPopupMenuItems, OnSelectPopupMenuItems) 1051 IPC_MESSAGE_HANDLER(FrameMsg_SelectPopupMenuItems, OnSelectPopupMenuItems)
1050 #elif defined(OS_MACOSX) 1052 #elif defined(OS_MACOSX)
1051 IPC_MESSAGE_HANDLER(FrameMsg_SelectPopupMenuItem, OnSelectPopupMenuItem) 1053 IPC_MESSAGE_HANDLER(FrameMsg_SelectPopupMenuItem, OnSelectPopupMenuItem)
1052 IPC_MESSAGE_HANDLER(InputMsg_CopyToFindPboard, OnCopyToFindPboard) 1054 IPC_MESSAGE_HANDLER(InputMsg_CopyToFindPboard, OnCopyToFindPboard)
1053 #endif 1055 #endif
1054 IPC_END_MESSAGE_MAP() 1056 IPC_END_MESSAGE_MAP()
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
1556 delete renderer_accessibility_; 1558 delete renderer_accessibility_;
1557 renderer_accessibility_ = NULL; 1559 renderer_accessibility_ = NULL;
1558 } 1560 }
1559 if (accessibility_mode_ == AccessibilityModeOff) 1561 if (accessibility_mode_ == AccessibilityModeOff)
1560 return; 1562 return;
1561 1563
1562 if (accessibility_mode_ & AccessibilityModeFlagFullTree) 1564 if (accessibility_mode_ & AccessibilityModeFlagFullTree)
1563 renderer_accessibility_ = new RendererAccessibility(this); 1565 renderer_accessibility_ = new RendererAccessibility(this);
1564 } 1566 }
1565 1567
1568 void RenderFrameImpl::OnSnapshotAccessibilityTree(int token) {
1569 ui::AXTreeUpdate response;
1570 RendererAccessibility::SnapshotAccessibilityTree(this, &response);
1571 Send(new AccessibilityHostMsg_SnapshotResponse(routing_id_, token, response));
1572 }
1573
1566 void RenderFrameImpl::OnDisownOpener() { 1574 void RenderFrameImpl::OnDisownOpener() {
1567 // TODO(creis): We should only see this for main frames for now. To support 1575 // TODO(creis): We should only see this for main frames for now. To support
1568 // disowning the opener on subframes, we will need to move WebContentsImpl's 1576 // disowning the opener on subframes, we will need to move WebContentsImpl's
1569 // opener_ to FrameTreeNode. 1577 // opener_ to FrameTreeNode.
1570 CHECK(!frame_->parent()); 1578 CHECK(!frame_->parent());
1571 1579
1572 if (frame_->opener()) 1580 if (frame_->opener())
1573 frame_->setOpener(NULL); 1581 frame_->setOpener(NULL);
1574 } 1582 }
1575 1583
(...skipping 3116 matching lines...) Expand 10 before | Expand all | Expand 10 after
4692 4700
4693 #if defined(ENABLE_BROWSER_CDMS) 4701 #if defined(ENABLE_BROWSER_CDMS)
4694 RendererCdmManager* RenderFrameImpl::GetCdmManager() { 4702 RendererCdmManager* RenderFrameImpl::GetCdmManager() {
4695 if (!cdm_manager_) 4703 if (!cdm_manager_)
4696 cdm_manager_ = new RendererCdmManager(this); 4704 cdm_manager_ = new RendererCdmManager(this);
4697 return cdm_manager_; 4705 return cdm_manager_;
4698 } 4706 }
4699 #endif // defined(ENABLE_BROWSER_CDMS) 4707 #endif // defined(ENABLE_BROWSER_CDMS)
4700 4708
4701 } // namespace content 4709 } // namespace content
OLDNEW
« content/browser/web_contents/web_contents_impl.cc ('K') | « content/renderer/render_frame_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698