OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/l10n_util_win.h" | 7 #include "app/l10n_util_win.h" |
8 #include "app/system_monitor.h" | 8 #include "app/system_monitor.h" |
9 #include "app/win_util.h" | 9 #include "app/win_util.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 "gfx/canvas.h" | |
13 #include "gfx/canvas_skia.h" | 12 #include "gfx/canvas_skia.h" |
14 #include "gfx/native_theme_win.h" | 13 #include "gfx/native_theme_win.h" |
15 #include "gfx/path.h" | 14 #include "gfx/path.h" |
16 #include "views/accessibility/view_accessibility.h" | 15 #include "views/accessibility/view_accessibility.h" |
17 #include "views/controls/native_control_win.h" | 16 #include "views/controls/native_control_win.h" |
18 #include "views/focus/focus_util_win.h" | 17 #include "views/focus/focus_util_win.h" |
19 #include "views/views_delegate.h" | 18 #include "views/views_delegate.h" |
20 #include "views/widget/aero_tooltip_manager.h" | 19 #include "views/widget/aero_tooltip_manager.h" |
21 #include "views/widget/default_theme_provider.h" | 20 #include "views/widget/default_theme_provider.h" |
22 #include "views/widget/drop_target_win.h" | 21 #include "views/widget/drop_target_win.h" |
(...skipping 1092 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1115 WidgetWin* widget = | 1114 WidgetWin* widget = |
1116 reinterpret_cast<WidgetWin*>(win_util::GetWindowUserData(parent)); | 1115 reinterpret_cast<WidgetWin*>(win_util::GetWindowUserData(parent)); |
1117 if (widget && widget->is_window_) | 1116 if (widget && widget->is_window_) |
1118 return static_cast<WindowWin*>(widget); | 1117 return static_cast<WindowWin*>(widget); |
1119 parent = ::GetParent(parent); | 1118 parent = ::GetParent(parent); |
1120 } | 1119 } |
1121 return NULL; | 1120 return NULL; |
1122 } | 1121 } |
1123 | 1122 |
1124 void WidgetWin::SizeContents(const gfx::Size& window_size) { | 1123 void WidgetWin::SizeContents(const gfx::Size& window_size) { |
1125 contents_.reset(new gfx::Canvas(window_size.width(), | 1124 contents_.reset(new gfx::CanvasSkia(window_size.width(), |
1126 window_size.height(), | 1125 window_size.height(), |
1127 false)); | 1126 false)); |
1128 } | 1127 } |
1129 | 1128 |
1130 void WidgetWin::PaintLayeredWindow() { | 1129 void WidgetWin::PaintLayeredWindow() { |
1131 // Painting monkeys with our cliprect, so we need to save it so that the | 1130 // Painting monkeys with our cliprect, so we need to save it so that the |
1132 // call to UpdateLayeredWindow updates the entire window, not just the | 1131 // call to UpdateLayeredWindow updates the entire window, not just the |
1133 // cliprect. | 1132 // cliprect. |
1134 contents_->save(SkCanvas::kClip_SaveFlag); | 1133 contents_->save(SkCanvas::kClip_SaveFlag); |
1135 gfx::Rect dirty_rect = root_view_->GetScheduledPaintRect(); | 1134 gfx::Rect dirty_rect = root_view_->GetScheduledPaintRect(); |
1136 contents_->ClipRectInt(dirty_rect.x(), dirty_rect.y(), dirty_rect.width(), | 1135 contents_->ClipRectInt(dirty_rect.x(), dirty_rect.y(), dirty_rect.width(), |
1137 dirty_rect.height()); | 1136 dirty_rect.height()); |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1367 Widget* Widget::GetWidgetFromNativeWindow(gfx::NativeWindow native_window) { | 1366 Widget* Widget::GetWidgetFromNativeWindow(gfx::NativeWindow native_window) { |
1368 return Widget::GetWidgetFromNativeView(native_window); | 1367 return Widget::GetWidgetFromNativeView(native_window); |
1369 } | 1368 } |
1370 | 1369 |
1371 // static | 1370 // static |
1372 void Widget::NotifyLocaleChanged() { | 1371 void Widget::NotifyLocaleChanged() { |
1373 NOTIMPLEMENTED(); | 1372 NOTIMPLEMENTED(); |
1374 } | 1373 } |
1375 | 1374 |
1376 } // namespace views | 1375 } // namespace views |
OLD | NEW |