| 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/accessibility/browser_accessibility_manager_win.h" | 10 #include "content/browser/accessibility/browser_accessibility_manager_win.h" |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 reinterpret_cast<void **>(window_accessible_.Receive())); | 117 reinterpret_cast<void **>(window_accessible_.Receive())); |
| 118 DCHECK(SUCCEEDED(hr)); | 118 DCHECK(SUCCEEDED(hr)); |
| 119 | 119 |
| 120 if (!BrowserAccessibilityState::GetInstance()->IsAccessibleBrowser()) { | 120 if (!BrowserAccessibilityState::GetInstance()->IsAccessibleBrowser()) { |
| 121 // Attempt to detect screen readers or other clients who want full | 121 // Attempt to detect screen readers or other clients who want full |
| 122 // accessibility support, by seeing if they respond to this event. | 122 // accessibility support, by seeing if they respond to this event. |
| 123 NotifyWinEvent(EVENT_SYSTEM_ALERT, hwnd(), kIdScreenReaderHoneyPot, | 123 NotifyWinEvent(EVENT_SYSTEM_ALERT, hwnd(), kIdScreenReaderHoneyPot, |
| 124 CHILDID_SELF); | 124 CHILDID_SELF); |
| 125 } | 125 } |
| 126 | 126 |
| 127 // http://crbug.com/440579 TODO(dmazzoni): remove this logging when |
| 128 // flakiness is fixed. |
| 129 LOG(INFO) << "LegacyRenderWidgetHostHWND::Init hwnd=" << hwnd(); |
| 130 |
| 127 return !!SUCCEEDED(hr); | 131 return !!SUCCEEDED(hr); |
| 128 } | 132 } |
| 129 | 133 |
| 130 // static | 134 // static |
| 131 ui::WindowEventTarget* LegacyRenderWidgetHostHWND::GetWindowEventTarget( | 135 ui::WindowEventTarget* LegacyRenderWidgetHostHWND::GetWindowEventTarget( |
| 132 HWND parent) { | 136 HWND parent) { |
| 133 return reinterpret_cast<ui::WindowEventTarget*>(ui::ViewProp::GetValue( | 137 return reinterpret_cast<ui::WindowEventTarget*>(ui::ViewProp::GetValue( |
| 134 parent, ui::WindowEventTarget::kWin32InputEventTarget)); | 138 parent, ui::WindowEventTarget::kWin32InputEventTarget)); |
| 135 } | 139 } |
| 136 | 140 |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 // generate the legacy WM_VSCROLL/WM_HSCROLL messages. | 388 // generate the legacy WM_VSCROLL/WM_HSCROLL messages. |
| 385 // We add these styles to ensure that trackpad/trackpoint scrolling | 389 // We add these styles to ensure that trackpad/trackpoint scrolling |
| 386 // work. | 390 // work. |
| 387 long current_style = ::GetWindowLong(hwnd(), GWL_STYLE); | 391 long current_style = ::GetWindowLong(hwnd(), GWL_STYLE); |
| 388 ::SetWindowLong(hwnd(), GWL_STYLE, | 392 ::SetWindowLong(hwnd(), GWL_STYLE, |
| 389 current_style | WS_VSCROLL | WS_HSCROLL); | 393 current_style | WS_VSCROLL | WS_HSCROLL); |
| 390 return 0; | 394 return 0; |
| 391 } | 395 } |
| 392 | 396 |
| 393 } // namespace content | 397 } // namespace content |
| OLD | NEW |