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

Unified Diff: views/controls/native/native_view_host_win.cc

Issue 6995126: Make web content accessibility tree a descendant of main window's tree again (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « views/controls/native/native_view_host_win.h ('k') | views/controls/native/native_view_host_wrapper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/native/native_view_host_win.cc
===================================================================
--- views/controls/native/native_view_host_win.cc (revision 88807)
+++ views/controls/native/native_view_host_win.cc (working copy)
@@ -4,6 +4,8 @@
#include "views/controls/native/native_view_host_win.h"
+#include <oleacc.h>
+
#include "base/logging.h"
#include "ui/gfx/canvas.h"
#include "views/controls/native/native_view_host.h"
@@ -123,6 +125,22 @@
::SetFocus(host_->native_view());
}
+gfx::NativeViewAccessible NativeViewHostWin::GetNativeViewAccessible() {
+ HWND hwnd = host_->native_view();
+ if (!IsWindow(hwnd))
+ return NULL;
+
+ LRESULT ret = SendMessage(hwnd, WM_GETOBJECT, 0, OBJID_CLIENT);
+ IAccessible* accessible = NULL;
+ HRESULT success = ObjectFromLresult(
+ ret, IID_IDispatch, 0, reinterpret_cast<void**>(accessible));
+ if (success == S_OK) {
+ return accessible;
+ } else {
+ return NULL;
+ }
+}
+
////////////////////////////////////////////////////////////////////////////////
// NativeViewHostWrapper, public:
« no previous file with comments | « views/controls/native/native_view_host_win.h ('k') | views/controls/native/native_view_host_wrapper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698