Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(703)

Side by Side Diff: content/browser/renderer_host/legacy_render_widget_host_win.cc

Issue 440793002: Fix the painting problems seen in the tabstrip when switching from a theme to glass on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed debugging code Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « content/browser/renderer_host/legacy_render_widget_host_win.h ('k') | ui/views/win/hwnd_message_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698