OLD | NEW |
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2014 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/browser/renderer_host/legacy_render_widget_host_win.h" | 5 #include "content/browser/renderer_host/legacy_render_widget_host_win.h" |
6 | 6 |
7 #include <objbase.h> | 7 #include <objbase.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 return static_cast<LRESULT>(0L); | 175 return static_cast<LRESULT>(0L); |
176 | 176 |
177 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From( | 177 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From( |
178 host_->GetRenderWidgetHost()); | 178 host_->GetRenderWidgetHost()); |
179 if (!rwhi) | 179 if (!rwhi) |
180 return static_cast<LRESULT>(0L); | 180 return static_cast<LRESULT>(0L); |
181 | 181 |
182 BrowserAccessibilityManagerWin* manager = | 182 BrowserAccessibilityManagerWin* manager = |
183 static_cast<BrowserAccessibilityManagerWin*>( | 183 static_cast<BrowserAccessibilityManagerWin*>( |
184 rwhi->GetRootBrowserAccessibilityManager()); | 184 rwhi->GetRootBrowserAccessibilityManager()); |
185 if (!manager) | 185 if (!manager || !manager->GetRoot()) |
186 return static_cast<LRESULT>(0L); | 186 return static_cast<LRESULT>(0L); |
187 | 187 |
188 base::win::ScopedComPtr<IAccessible> root( | 188 base::win::ScopedComPtr<IAccessible> root( |
189 ToBrowserAccessibilityWin(manager->GetRoot())->GetCOM()); | 189 ToBrowserAccessibilityWin(manager->GetRoot())->GetCOM()); |
190 return LresultFromObject(IID_IAccessible, w_param, | 190 return LresultFromObject(IID_IAccessible, w_param, |
191 static_cast<IAccessible*>(root.Detach())); | 191 static_cast<IAccessible*>(root.Detach())); |
192 } | 192 } |
193 | 193 |
194 // We send keyboard/mouse/touch messages to the parent window via SendMessage. | 194 // We send keyboard/mouse/touch messages to the parent window via SendMessage. |
195 // While this works, this has the side effect of converting input messages into | 195 // While this works, this has the side effect of converting input messages into |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
422 direct_manipulation_helper_->Activate(hwnd()); | 422 direct_manipulation_helper_->Activate(hwnd()); |
423 } else if (window_pos->flags & SWP_HIDEWINDOW) { | 423 } else if (window_pos->flags & SWP_HIDEWINDOW) { |
424 direct_manipulation_helper_->Deactivate(hwnd()); | 424 direct_manipulation_helper_->Deactivate(hwnd()); |
425 } | 425 } |
426 } | 426 } |
427 SetMsgHandled(FALSE); | 427 SetMsgHandled(FALSE); |
428 return 0; | 428 return 0; |
429 } | 429 } |
430 | 430 |
431 } // namespace content | 431 } // namespace content |
OLD | NEW |