| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/ui/views/frame/browser_desktop_root_window_host_win.h" | 5 #include "chrome/browser/ui/views/frame/browser_desktop_root_window_host_win.h" |
| 6 | 6 |
| 7 #include <dwmapi.h> | 7 #include <dwmapi.h> |
| 8 | 8 |
| 9 #include "chrome/browser/lifetime/application_lifetime.h" | 9 #include "chrome/browser/lifetime/application_lifetime.h" |
| 10 #include "chrome/browser/themes/theme_service.h" | 10 #include "chrome/browser/themes/theme_service.h" |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 // position when the window becomes visible. This fixes bugs where the icon | 208 // position when the window becomes visible. This fixes bugs where the icon |
| 209 // appears to overlay the minimize button. | 209 // appears to overlay the minimize button. |
| 210 // Note that we will call Layout every time SetWindowPos is called with | 210 // Note that we will call Layout every time SetWindowPos is called with |
| 211 // SWP_SHOWWINDOW, however callers typically are careful about not | 211 // SWP_SHOWWINDOW, however callers typically are careful about not |
| 212 // specifying this flag unless necessary to avoid flicker. | 212 // specifying this flag unless necessary to avoid flicker. |
| 213 // This may be invoked during creation on XP and before the non_client_view | 213 // This may be invoked during creation on XP and before the non_client_view |
| 214 // has been created. | 214 // has been created. |
| 215 WINDOWPOS* window_pos = reinterpret_cast<WINDOWPOS*>(l_param); | 215 WINDOWPOS* window_pos = reinterpret_cast<WINDOWPOS*>(l_param); |
| 216 if (window_pos->flags & SWP_SHOWWINDOW && GetWidget()->non_client_view()) { | 216 if (window_pos->flags & SWP_SHOWWINDOW && GetWidget()->non_client_view()) { |
| 217 GetWidget()->non_client_view()->Layout(); | 217 GetWidget()->non_client_view()->Layout(); |
| 218 GetWidget()->non_client_view()->SchedulePaint(); | 218 GetWidget()->non_client_view()->frame_view()->SchedulePaint(); |
| 219 } | 219 } |
| 220 break; | 220 break; |
| 221 } | 221 } |
| 222 case WM_ERASEBKGND: | 222 case WM_ERASEBKGND: |
| 223 if (!did_gdi_clear_ && DesktopRootWindowHostWin::ShouldUseNativeFrame()) { | 223 if (!did_gdi_clear_ && DesktopRootWindowHostWin::ShouldUseNativeFrame()) { |
| 224 // This is necessary to avoid white flashing in the titlebar area around | 224 // This is necessary to avoid white flashing in the titlebar area around |
| 225 // the minimize/maximize/close buttons. | 225 // the minimize/maximize/close buttons. |
| 226 HDC dc = GetDC(GetHWND()); | 226 HDC dc = GetDC(GetHWND()); |
| 227 MARGINS margins = GetDWMFrameMargins(); | 227 MARGINS margins = GetDWMFrameMargins(); |
| 228 RECT client_rect; | 228 RECT client_rect; |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 BrowserDesktopRootWindowHost::CreateBrowserDesktopRootWindowHost( | 325 BrowserDesktopRootWindowHost::CreateBrowserDesktopRootWindowHost( |
| 326 views::internal::NativeWidgetDelegate* native_widget_delegate, | 326 views::internal::NativeWidgetDelegate* native_widget_delegate, |
| 327 views::DesktopNativeWidgetAura* desktop_native_widget_aura, | 327 views::DesktopNativeWidgetAura* desktop_native_widget_aura, |
| 328 BrowserView* browser_view, | 328 BrowserView* browser_view, |
| 329 BrowserFrame* browser_frame) { | 329 BrowserFrame* browser_frame) { |
| 330 return new BrowserDesktopRootWindowHostWin(native_widget_delegate, | 330 return new BrowserDesktopRootWindowHostWin(native_widget_delegate, |
| 331 desktop_native_widget_aura, | 331 desktop_native_widget_aura, |
| 332 browser_view, | 332 browser_view, |
| 333 browser_frame); | 333 browser_frame); |
| 334 } | 334 } |
| OLD | NEW |