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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 ::ShowWindow(hwnd(), SW_SHOW); | 75 ::ShowWindow(hwnd(), SW_SHOW); |
76 } | 76 } |
77 | 77 |
78 void LegacyRenderWidgetHostHWND::Hide() { | 78 void LegacyRenderWidgetHostHWND::Hide() { |
79 ::ShowWindow(hwnd(), SW_HIDE); | 79 ::ShowWindow(hwnd(), SW_HIDE); |
80 } | 80 } |
81 | 81 |
82 void LegacyRenderWidgetHostHWND::SetBounds(const gfx::Rect& bounds) { | 82 void LegacyRenderWidgetHostHWND::SetBounds(const gfx::Rect& bounds) { |
83 gfx::Rect bounds_in_pixel = gfx::win::DIPToScreenRect(bounds); | 83 gfx::Rect bounds_in_pixel = gfx::win::DIPToScreenRect(bounds); |
84 ::SetWindowPos(hwnd(), NULL, bounds_in_pixel.x(), bounds_in_pixel.y(), | 84 ::SetWindowPos(hwnd(), NULL, bounds_in_pixel.x(), bounds_in_pixel.y(), |
85 bounds_in_pixel.width(), bounds_in_pixel.height(), 0); | 85 bounds_in_pixel.width(), bounds_in_pixel.height(), |
| 86 SWP_NOREDRAW); |
86 } | 87 } |
87 | 88 |
88 void LegacyRenderWidgetHostHWND::OnFinalMessage(HWND hwnd) { | 89 void LegacyRenderWidgetHostHWND::OnFinalMessage(HWND hwnd) { |
89 if (host_) { | 90 if (host_) { |
90 host_->OnLegacyWindowDestroyed(); | 91 host_->OnLegacyWindowDestroyed(); |
91 host_ = NULL; | 92 host_ = NULL; |
92 } | 93 } |
93 delete this; | 94 delete this; |
94 } | 95 } |
95 | 96 |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
370 // generate the legacy WM_VSCROLL/WM_HSCROLL messages. | 371 // generate the legacy WM_VSCROLL/WM_HSCROLL messages. |
371 // We add these styles to ensure that trackpad/trackpoint scrolling | 372 // We add these styles to ensure that trackpad/trackpoint scrolling |
372 // work. | 373 // work. |
373 long current_style = ::GetWindowLong(hwnd(), GWL_STYLE); | 374 long current_style = ::GetWindowLong(hwnd(), GWL_STYLE); |
374 ::SetWindowLong(hwnd(), GWL_STYLE, | 375 ::SetWindowLong(hwnd(), GWL_STYLE, |
375 current_style | WS_VSCROLL | WS_HSCROLL); | 376 current_style | WS_VSCROLL | WS_HSCROLL); |
376 return 0; | 377 return 0; |
377 } | 378 } |
378 | 379 |
379 } // namespace content | 380 } // namespace content |
OLD | NEW |