| 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 | 76 |
| 77 void LegacyRenderWidgetHostHWND::Hide() { | 77 void LegacyRenderWidgetHostHWND::Hide() { |
| 78 ::ShowWindow(hwnd(), SW_HIDE); | 78 ::ShowWindow(hwnd(), SW_HIDE); |
| 79 } | 79 } |
| 80 | 80 |
| 81 void LegacyRenderWidgetHostHWND::SetBounds(const gfx::Rect& bounds) { | 81 void LegacyRenderWidgetHostHWND::SetBounds(const gfx::Rect& bounds) { |
| 82 ::SetWindowPos(hwnd(), NULL, bounds.x(), bounds.y(), bounds.width(), | 82 ::SetWindowPos(hwnd(), NULL, bounds.x(), bounds.y(), bounds.width(), |
| 83 bounds.height(), 0); | 83 bounds.height(), 0); |
| 84 } | 84 } |
| 85 | 85 |
| 86 void LegacyRenderWidgetHostHWND::OnFinalMessage(HWND hwnd) { | |
| 87 if (manager_) | |
| 88 manager_->OnAccessibleHwndDeleted(); | |
| 89 } | |
| 90 | |
| 91 LegacyRenderWidgetHostHWND::LegacyRenderWidgetHostHWND(HWND parent) | 86 LegacyRenderWidgetHostHWND::LegacyRenderWidgetHostHWND(HWND parent) |
| 92 : manager_(NULL), | 87 : manager_(NULL), |
| 93 mouse_tracking_enabled_(false) { | 88 mouse_tracking_enabled_(false) { |
| 94 RECT rect = {0}; | 89 RECT rect = {0}; |
| 95 Base::Create(parent, rect, L"Chrome Legacy Window", | 90 Base::Create(parent, rect, L"Chrome Legacy Window", |
| 96 WS_CHILDWINDOW | WS_CLIPCHILDREN | WS_CLIPSIBLINGS, | 91 WS_CHILDWINDOW | WS_CLIPCHILDREN | WS_CLIPSIBLINGS, |
| 97 WS_EX_TRANSPARENT); | 92 WS_EX_TRANSPARENT); |
| 98 } | 93 } |
| 99 | 94 |
| 100 bool LegacyRenderWidgetHostHWND::Init() { | 95 bool LegacyRenderWidgetHostHWND::Init() { |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 // generate the legacy WM_VSCROLL/WM_HSCROLL messages. | 313 // generate the legacy WM_VSCROLL/WM_HSCROLL messages. |
| 319 // We add these styles to ensure that trackpad/trackpoint scrolling | 314 // We add these styles to ensure that trackpad/trackpoint scrolling |
| 320 // work. | 315 // work. |
| 321 long current_style = ::GetWindowLong(hwnd(), GWL_STYLE); | 316 long current_style = ::GetWindowLong(hwnd(), GWL_STYLE); |
| 322 ::SetWindowLong(hwnd(), GWL_STYLE, | 317 ::SetWindowLong(hwnd(), GWL_STYLE, |
| 323 current_style | WS_VSCROLL | WS_HSCROLL); | 318 current_style | WS_VSCROLL | WS_HSCROLL); |
| 324 return 0; | 319 return 0; |
| 325 } | 320 } |
| 326 | 321 |
| 327 } // namespace content | 322 } // namespace content |
| OLD | NEW |