| 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 <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/win/win_util.h" | 10 #include "base/win/win_util.h" |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 if (!rwhi) | 178 if (!rwhi) |
| 179 return static_cast<LRESULT>(0L); | 179 return static_cast<LRESULT>(0L); |
| 180 | 180 |
| 181 BrowserAccessibilityManagerWin* manager = | 181 BrowserAccessibilityManagerWin* manager = |
| 182 static_cast<BrowserAccessibilityManagerWin*>( | 182 static_cast<BrowserAccessibilityManagerWin*>( |
| 183 rwhi->GetRootBrowserAccessibilityManager()); | 183 rwhi->GetRootBrowserAccessibilityManager()); |
| 184 if (!manager) | 184 if (!manager) |
| 185 return static_cast<LRESULT>(0L); | 185 return static_cast<LRESULT>(0L); |
| 186 | 186 |
| 187 base::win::ScopedComPtr<IAccessible> root( | 187 base::win::ScopedComPtr<IAccessible> root( |
| 188 ToBrowserAccessibilityWin(manager->GetRoot())); | 188 ToBrowserAccessibilityWin(manager->GetRoot())->GetCOM()); |
| 189 return LresultFromObject(IID_IAccessible, w_param, | 189 return LresultFromObject(IID_IAccessible, w_param, |
| 190 static_cast<IAccessible*>(root.Detach())); | 190 static_cast<IAccessible*>(root.Detach())); |
| 191 } | 191 } |
| 192 | 192 |
| 193 // We send keyboard/mouse/touch messages to the parent window via SendMessage. | 193 // We send keyboard/mouse/touch messages to the parent window via SendMessage. |
| 194 // While this works, this has the side effect of converting input messages into | 194 // While this works, this has the side effect of converting input messages into |
| 195 // sent messages which changes their priority and could technically result | 195 // sent messages which changes their priority and could technically result |
| 196 // in these messages starving other messages in the queue. Additionally | 196 // in these messages starving other messages in the queue. Additionally |
| 197 // keyboard/mouse hooks would not see these messages. The alternative approach | 197 // keyboard/mouse hooks would not see these messages. The alternative approach |
| 198 // is to set and release capture as needed on the parent to ensure that it | 198 // is to set and release capture as needed on the parent to ensure that it |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 421 direct_manipulation_helper_->Activate(hwnd()); | 421 direct_manipulation_helper_->Activate(hwnd()); |
| 422 } else if (window_pos->flags & SWP_HIDEWINDOW) { | 422 } else if (window_pos->flags & SWP_HIDEWINDOW) { |
| 423 direct_manipulation_helper_->Deactivate(hwnd()); | 423 direct_manipulation_helper_->Deactivate(hwnd()); |
| 424 } | 424 } |
| 425 } | 425 } |
| 426 SetMsgHandled(FALSE); | 426 SetMsgHandled(FALSE); |
| 427 return 0; | 427 return 0; |
| 428 } | 428 } |
| 429 | 429 |
| 430 } // namespace content | 430 } // namespace content |
| OLD | NEW |