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

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: Clean up callbacks before end of OnRenderProcessGone 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
« no previous file with comments | « content/renderer/render_frame_impl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1031 matching lines...) Expand 10 before | Expand all | Expand 10 after
1042 OnHideTransitionElements) 1042 OnHideTransitionElements)
1043 IPC_MESSAGE_HANDLER(FrameMsg_ShowTransitionElements, 1043 IPC_MESSAGE_HANDLER(FrameMsg_ShowTransitionElements,
1044 OnShowTransitionElements) 1044 OnShowTransitionElements)
1045 IPC_MESSAGE_HANDLER(FrameMsg_Reload, OnReload) 1045 IPC_MESSAGE_HANDLER(FrameMsg_Reload, OnReload)
1046 IPC_MESSAGE_HANDLER(FrameMsg_TextSurroundingSelectionRequest, 1046 IPC_MESSAGE_HANDLER(FrameMsg_TextSurroundingSelectionRequest,
1047 OnTextSurroundingSelectionRequest) 1047 OnTextSurroundingSelectionRequest)
1048 IPC_MESSAGE_HANDLER(FrameMsg_AddStyleSheetByURL, 1048 IPC_MESSAGE_HANDLER(FrameMsg_AddStyleSheetByURL,
1049 OnAddStyleSheetByURL) 1049 OnAddStyleSheetByURL)
1050 IPC_MESSAGE_HANDLER(FrameMsg_SetAccessibilityMode, 1050 IPC_MESSAGE_HANDLER(FrameMsg_SetAccessibilityMode,
1051 OnSetAccessibilityMode) 1051 OnSetAccessibilityMode)
1052 IPC_MESSAGE_HANDLER(AccessibilityMsg_SnapshotTree,
1053 OnSnapshotAccessibilityTree)
1052 IPC_MESSAGE_HANDLER(FrameMsg_DisownOpener, OnDisownOpener) 1054 IPC_MESSAGE_HANDLER(FrameMsg_DisownOpener, OnDisownOpener)
1053 IPC_MESSAGE_HANDLER(FrameMsg_CommitNavigation, OnCommitNavigation) 1055 IPC_MESSAGE_HANDLER(FrameMsg_CommitNavigation, OnCommitNavigation)
1054 IPC_MESSAGE_HANDLER(FrameMsg_DidUpdateSandboxFlags, OnDidUpdateSandboxFlags) 1056 IPC_MESSAGE_HANDLER(FrameMsg_DidUpdateSandboxFlags, OnDidUpdateSandboxFlags)
1055 IPC_MESSAGE_HANDLER(FrameMsg_SetTextTrackSettings, 1057 IPC_MESSAGE_HANDLER(FrameMsg_SetTextTrackSettings,
1056 OnTextTrackSettingsChanged) 1058 OnTextTrackSettingsChanged)
1057 IPC_MESSAGE_HANDLER(FrameMsg_PostMessageEvent, OnPostMessageEvent) 1059 IPC_MESSAGE_HANDLER(FrameMsg_PostMessageEvent, OnPostMessageEvent)
1058 #if defined(OS_ANDROID) 1060 #if defined(OS_ANDROID)
1059 IPC_MESSAGE_HANDLER(FrameMsg_SelectPopupMenuItems, OnSelectPopupMenuItems) 1061 IPC_MESSAGE_HANDLER(FrameMsg_SelectPopupMenuItems, OnSelectPopupMenuItems)
1060 #elif defined(OS_MACOSX) 1062 #elif defined(OS_MACOSX)
1061 IPC_MESSAGE_HANDLER(FrameMsg_SelectPopupMenuItem, OnSelectPopupMenuItem) 1063 IPC_MESSAGE_HANDLER(FrameMsg_SelectPopupMenuItem, OnSelectPopupMenuItem)
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
1572 delete renderer_accessibility_; 1574 delete renderer_accessibility_;
1573 renderer_accessibility_ = NULL; 1575 renderer_accessibility_ = NULL;
1574 } 1576 }
1575 if (accessibility_mode_ == AccessibilityModeOff) 1577 if (accessibility_mode_ == AccessibilityModeOff)
1576 return; 1578 return;
1577 1579
1578 if (accessibility_mode_ & AccessibilityModeFlagFullTree) 1580 if (accessibility_mode_ & AccessibilityModeFlagFullTree)
1579 renderer_accessibility_ = new RendererAccessibility(this); 1581 renderer_accessibility_ = new RendererAccessibility(this);
1580 } 1582 }
1581 1583
1584 void RenderFrameImpl::OnSnapshotAccessibilityTree(int callback_id) {
1585 ui::AXTreeUpdate response;
1586 RendererAccessibility::SnapshotAccessibilityTree(this, &response);
1587 Send(new AccessibilityHostMsg_SnapshotResponse(
1588 routing_id_, callback_id, response));
1589 }
1590
1582 void RenderFrameImpl::OnDisownOpener() { 1591 void RenderFrameImpl::OnDisownOpener() {
1583 // TODO(creis): We should only see this for main frames for now. To support 1592 // TODO(creis): We should only see this for main frames for now. To support
1584 // disowning the opener on subframes, we will need to move WebContentsImpl's 1593 // disowning the opener on subframes, we will need to move WebContentsImpl's
1585 // opener_ to FrameTreeNode. 1594 // opener_ to FrameTreeNode.
1586 CHECK(!frame_->parent()); 1595 CHECK(!frame_->parent());
1587 1596
1588 if (frame_->opener()) 1597 if (frame_->opener())
1589 frame_->setOpener(NULL); 1598 frame_->setOpener(NULL);
1590 } 1599 }
1591 1600
(...skipping 3190 matching lines...) Expand 10 before | Expand all | Expand 10 after
4782 #elif defined(ENABLE_BROWSER_CDMS) 4791 #elif defined(ENABLE_BROWSER_CDMS)
4783 cdm_manager_, 4792 cdm_manager_,
4784 #endif 4793 #endif
4785 this); 4794 this);
4786 } 4795 }
4787 4796
4788 return cdm_factory_; 4797 return cdm_factory_;
4789 } 4798 }
4790 4799
4791 } // namespace content 4800 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_frame_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698