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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "views/controls/native/native_view_host_win.h" 5 #include "views/controls/native/native_view_host_win.h"
6 6
7 #include <oleacc.h>
8
7 #include "base/logging.h" 9 #include "base/logging.h"
8 #include "ui/gfx/canvas.h" 10 #include "ui/gfx/canvas.h"
9 #include "views/controls/native/native_view_host.h" 11 #include "views/controls/native/native_view_host.h"
10 #include "views/focus/focus_manager.h" 12 #include "views/focus/focus_manager.h"
11 #include "views/widget/native_widget.h" 13 #include "views/widget/native_widget.h"
12 #include "views/widget/root_view.h" 14 #include "views/widget/root_view.h"
13 #include "views/widget/widget.h" 15 #include "views/widget/widget.h"
14 16
15 namespace views { 17 namespace views {
16 18
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 // it. 118 // it.
117 SetWindowPos(host_->native_view(), 0, 0, 0, 0, 0, 119 SetWindowPos(host_->native_view(), 0, 0, 0, 0, 0,
118 SWP_HIDEWINDOW | SWP_NOSIZE | SWP_NOMOVE | SWP_NOZORDER | 120 SWP_HIDEWINDOW | SWP_NOSIZE | SWP_NOMOVE | SWP_NOZORDER |
119 SWP_NOREDRAW | SWP_NOOWNERZORDER); 121 SWP_NOREDRAW | SWP_NOOWNERZORDER);
120 } 122 }
121 123
122 void NativeViewHostWin::SetFocus() { 124 void NativeViewHostWin::SetFocus() {
123 ::SetFocus(host_->native_view()); 125 ::SetFocus(host_->native_view());
124 } 126 }
125 127
128 gfx::NativeViewAccessible NativeViewHostWin::GetNativeViewAccessible() {
129 HWND hwnd = host_->native_view();
130 if (!IsWindow(hwnd))
131 return NULL;
132
133 LRESULT ret = SendMessage(hwnd, WM_GETOBJECT, 0, OBJID_CLIENT);
134 IAccessible* accessible = NULL;
135 HRESULT success = ObjectFromLresult(
136 ret, IID_IDispatch, 0, reinterpret_cast<void**>(accessible));
137 if (success == S_OK) {
138 return accessible;
139 } else {
140 return NULL;
141 }
142 }
143
126 //////////////////////////////////////////////////////////////////////////////// 144 ////////////////////////////////////////////////////////////////////////////////
127 // NativeViewHostWrapper, public: 145 // NativeViewHostWrapper, public:
128 146
129 // static 147 // static
130 NativeViewHostWrapper* NativeViewHostWrapper::CreateWrapper( 148 NativeViewHostWrapper* NativeViewHostWrapper::CreateWrapper(
131 NativeViewHost* host) { 149 NativeViewHost* host) {
132 return new NativeViewHostWin(host); 150 return new NativeViewHostWin(host);
133 } 151 }
134 152
135 } // namespace views 153 } // namespace views
OLDNEW
« 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