| 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 "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/win/windows_version.h" | 9 #include "base/win/windows_version.h" |
| 10 #include "content/browser/renderer_host/legacy_render_widget_host_win_delegate.h
" | 10 #include "content/browser/renderer_host/legacy_render_widget_host_win_delegate.h
" |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 // enable screen reader support. | 155 // enable screen reader support. |
| 156 BrowserAccessibilityState::GetInstance()->OnScreenReaderDetected(); | 156 BrowserAccessibilityState::GetInstance()->OnScreenReaderDetected(); |
| 157 return static_cast<LRESULT>(0L); | 157 return static_cast<LRESULT>(0L); |
| 158 } | 158 } |
| 159 | 159 |
| 160 if (OBJID_CLIENT != obj_id) | 160 if (OBJID_CLIENT != obj_id) |
| 161 return static_cast<LRESULT>(0L); | 161 return static_cast<LRESULT>(0L); |
| 162 | 162 |
| 163 base::win::ScopedComPtr<IAccessible> native_accessible( | 163 base::win::ScopedComPtr<IAccessible> native_accessible( |
| 164 delegate_->GetNativeViewAccessible()); | 164 delegate_->GetNativeViewAccessible()); |
| 165 if (!native_accessible) | 165 if (!native_accessible.get()) |
| 166 return static_cast<LRESULT>(0L); | 166 return static_cast<LRESULT>(0L); |
| 167 | 167 |
| 168 return LresultFromObject(IID_IAccessible, w_param, | 168 return LresultFromObject(IID_IAccessible, w_param, |
| 169 static_cast<IAccessible*>(native_accessible.Detach())); | 169 static_cast<IAccessible*>(native_accessible.Detach())); |
| 170 } | 170 } |
| 171 | 171 |
| 172 // We send keyboard/mouse/touch messages to the parent window via SendMessage. | 172 // We send keyboard/mouse/touch messages to the parent window via SendMessage. |
| 173 // While this works, this has the side effect of converting input messages into | 173 // While this works, this has the side effect of converting input messages into |
| 174 // sent messages which changes their priority and could technically result | 174 // sent messages which changes their priority and could technically result |
| 175 // in these messages starving other messages in the queue. Additionally | 175 // in these messages starving other messages in the queue. Additionally |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 // generate the legacy WM_VSCROLL/WM_HSCROLL messages. | 366 // generate the legacy WM_VSCROLL/WM_HSCROLL messages. |
| 367 // We add these styles to ensure that trackpad/trackpoint scrolling | 367 // We add these styles to ensure that trackpad/trackpoint scrolling |
| 368 // work. | 368 // work. |
| 369 long current_style = ::GetWindowLong(hwnd(), GWL_STYLE); | 369 long current_style = ::GetWindowLong(hwnd(), GWL_STYLE); |
| 370 ::SetWindowLong(hwnd(), GWL_STYLE, | 370 ::SetWindowLong(hwnd(), GWL_STYLE, |
| 371 current_style | WS_VSCROLL | WS_HSCROLL); | 371 current_style | WS_VSCROLL | WS_HSCROLL); |
| 372 return 0; | 372 return 0; |
| 373 } | 373 } |
| 374 | 374 |
| 375 } // namespace content | 375 } // namespace content |
| OLD | NEW |