| 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/chrome_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" |
| 11 #include "base/win_util.h" | 11 #include "base/win_util.h" |
| 12 #include "views/accessibility/view_accessibility.h" | 12 #include "views/accessibility/view_accessibility.h" |
| 13 #include "views/controls/native_control_win.h" | 13 #include "views/controls/native_control_win.h" |
| 14 #include "views/fill_layout.h" | 14 #include "views/fill_layout.h" |
| 15 #include "views/focus/focus_util_win.h" | 15 #include "views/focus/focus_util_win.h" |
| 16 #include "views/views_delegate.h" | 16 #include "views/views_delegate.h" |
| 17 #include "views/widget/aero_tooltip_manager.h" | 17 #include "views/widget/aero_tooltip_manager.h" |
| (...skipping 873 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 891 WidgetWin* widget = | 891 WidgetWin* widget = |
| 892 reinterpret_cast<WidgetWin*>(win_util::GetWindowUserData(parent)); | 892 reinterpret_cast<WidgetWin*>(win_util::GetWindowUserData(parent)); |
| 893 if (widget && widget->is_window_) | 893 if (widget && widget->is_window_) |
| 894 return static_cast<WindowWin*>(widget); | 894 return static_cast<WindowWin*>(widget); |
| 895 parent = ::GetParent(parent); | 895 parent = ::GetParent(parent); |
| 896 } | 896 } |
| 897 return NULL; | 897 return NULL; |
| 898 } | 898 } |
| 899 | 899 |
| 900 void WidgetWin::SizeContents(const CRect& window_rect) { | 900 void WidgetWin::SizeContents(const CRect& window_rect) { |
| 901 contents_.reset(new ChromeCanvas(window_rect.Width(), | 901 contents_.reset(new gfx::Canvas(window_rect.Width(), |
| 902 window_rect.Height(), | 902 window_rect.Height(), |
| 903 false)); | 903 false)); |
| 904 } | 904 } |
| 905 | 905 |
| 906 void WidgetWin::PaintLayeredWindow() { | 906 void WidgetWin::PaintLayeredWindow() { |
| 907 // Painting monkeys with our cliprect, so we need to save it so that the | 907 // Painting monkeys with our cliprect, so we need to save it so that the |
| 908 // call to UpdateLayeredWindow updates the entire window, not just the | 908 // call to UpdateLayeredWindow updates the entire window, not just the |
| 909 // cliprect. | 909 // cliprect. |
| 910 contents_->save(SkCanvas::kClip_SaveFlag); | 910 contents_->save(SkCanvas::kClip_SaveFlag); |
| 911 gfx::Rect dirty_rect = root_view_->GetScheduledPaintRect(); | 911 gfx::Rect dirty_rect = root_view_->GetScheduledPaintRect(); |
| 912 contents_->ClipRectInt(dirty_rect.x(), dirty_rect.y(), dirty_rect.width(), | 912 contents_->ClipRectInt(dirty_rect.x(), dirty_rect.y(), dirty_rect.width(), |
| 913 dirty_rect.height()); | 913 dirty_rect.height()); |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1036 result = DefWindowProc(window, message, w_param, l_param); | 1036 result = DefWindowProc(window, message, w_param, l_param); |
| 1037 if (message == WM_NCDESTROY) { | 1037 if (message == WM_NCDESTROY) { |
| 1038 TRACK_HWND_DESTRUCTION(window); | 1038 TRACK_HWND_DESTRUCTION(window); |
| 1039 widget->hwnd_ = NULL; | 1039 widget->hwnd_ = NULL; |
| 1040 widget->OnFinalMessage(window); | 1040 widget->OnFinalMessage(window); |
| 1041 } | 1041 } |
| 1042 return result; | 1042 return result; |
| 1043 } | 1043 } |
| 1044 | 1044 |
| 1045 } // namespace views | 1045 } // namespace views |
| OLD | NEW |