| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "views/widget/widget_win.h" | 5 #include "views/widget/widget_win.h" |
| 6 | 6 |
| 7 #include "app/gfx/canvas.h" | 7 #include "app/gfx/canvas.h" |
| 8 #include "app/win_util.h" | 8 #include "app/win_util.h" |
| 9 #include "base/gfx/native_theme.h" | 9 #include "base/gfx/native_theme.h" |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 | 307 |
| 308 static BOOL CALLBACK EnumChildProcForRedraw(HWND hwnd, LPARAM lparam) { | 308 static BOOL CALLBACK EnumChildProcForRedraw(HWND hwnd, LPARAM lparam) { |
| 309 DWORD process_id; | 309 DWORD process_id; |
| 310 GetWindowThreadProcessId(hwnd, &process_id); | 310 GetWindowThreadProcessId(hwnd, &process_id); |
| 311 gfx::Rect invalid_rect = *reinterpret_cast<gfx::Rect*>(lparam); | 311 gfx::Rect invalid_rect = *reinterpret_cast<gfx::Rect*>(lparam); |
| 312 | 312 |
| 313 RECT window_rect; | 313 RECT window_rect; |
| 314 GetWindowRect(hwnd, &window_rect); | 314 GetWindowRect(hwnd, &window_rect); |
| 315 invalid_rect.Offset(-window_rect.left, -window_rect.top); | 315 invalid_rect.Offset(-window_rect.left, -window_rect.top); |
| 316 | 316 |
| 317 int flags = RDW_INVALIDATE | RDW_NOCHILDREN; | 317 int flags = RDW_INVALIDATE | RDW_NOCHILDREN | RDW_FRAME; |
| 318 if (process_id == GetCurrentProcessId()) | 318 if (process_id == GetCurrentProcessId()) |
| 319 flags |= RDW_UPDATENOW; | 319 flags |= RDW_UPDATENOW; |
| 320 RedrawWindow(hwnd, &invalid_rect.ToRECT(), NULL, flags); | 320 RedrawWindow(hwnd, &invalid_rect.ToRECT(), NULL, flags); |
| 321 return TRUE; | 321 return TRUE; |
| 322 } | 322 } |
| 323 | 323 |
| 324 void WidgetWin::PaintNow(const gfx::Rect& update_rect) { | 324 void WidgetWin::PaintNow(const gfx::Rect& update_rect) { |
| 325 if (use_layered_buffer_) { | 325 if (use_layered_buffer_) { |
| 326 PaintLayeredWindow(); | 326 PaintLayeredWindow(); |
| 327 } else if (root_view_->NeedsPainting(false) && IsWindow()) { | 327 } else if (root_view_->NeedsPainting(false) && IsWindow()) { |
| (...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1032 if (!widget->ProcessWindowMessage(window, message, w_param, l_param, result)) | 1032 if (!widget->ProcessWindowMessage(window, message, w_param, l_param, result)) |
| 1033 result = DefWindowProc(window, message, w_param, l_param); | 1033 result = DefWindowProc(window, message, w_param, l_param); |
| 1034 if (message == WM_NCDESTROY) { | 1034 if (message == WM_NCDESTROY) { |
| 1035 widget->hwnd_ = NULL; | 1035 widget->hwnd_ = NULL; |
| 1036 widget->OnFinalMessage(window); | 1036 widget->OnFinalMessage(window); |
| 1037 } | 1037 } |
| 1038 return result; | 1038 return result; |
| 1039 } | 1039 } |
| 1040 | 1040 |
| 1041 } // namespace views | 1041 } // namespace views |
| OLD | NEW |