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

Side by Side Diff: views/widget/widget_win.cc

Issue 2811032: Revert 50784 - Canvas refactoring part 3.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « views/widget/widget_win.h ('k') | views/window/dialog_client_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
12 #include "gfx/canvas_skia.h" 13 #include "gfx/canvas_skia.h"
13 #include "gfx/native_theme_win.h" 14 #include "gfx/native_theme_win.h"
14 #include "gfx/path.h" 15 #include "gfx/path.h"
15 #include "views/accessibility/view_accessibility.h" 16 #include "views/accessibility/view_accessibility.h"
16 #include "views/controls/native_control_win.h" 17 #include "views/controls/native_control_win.h"
17 #include "views/focus/focus_util_win.h" 18 #include "views/focus/focus_util_win.h"
18 #include "views/views_delegate.h" 19 #include "views/views_delegate.h"
19 #include "views/widget/aero_tooltip_manager.h" 20 #include "views/widget/aero_tooltip_manager.h"
20 #include "views/widget/default_theme_provider.h" 21 #include "views/widget/default_theme_provider.h"
21 #include "views/widget/drop_target_win.h" 22 #include "views/widget/drop_target_win.h"
(...skipping 1092 matching lines...) Expand 10 before | Expand all | Expand 10 after
1114 WidgetWin* widget = 1115 WidgetWin* widget =
1115 reinterpret_cast<WidgetWin*>(win_util::GetWindowUserData(parent)); 1116 reinterpret_cast<WidgetWin*>(win_util::GetWindowUserData(parent));
1116 if (widget && widget->is_window_) 1117 if (widget && widget->is_window_)
1117 return static_cast<WindowWin*>(widget); 1118 return static_cast<WindowWin*>(widget);
1118 parent = ::GetParent(parent); 1119 parent = ::GetParent(parent);
1119 } 1120 }
1120 return NULL; 1121 return NULL;
1121 } 1122 }
1122 1123
1123 void WidgetWin::SizeContents(const gfx::Size& window_size) { 1124 void WidgetWin::SizeContents(const gfx::Size& window_size) {
1124 contents_.reset(new gfx::CanvasSkia(window_size.width(), 1125 contents_.reset(new gfx::Canvas(window_size.width(),
1125 window_size.height(), 1126 window_size.height(),
1126 false)); 1127 false));
1127 } 1128 }
1128 1129
1129 void WidgetWin::PaintLayeredWindow() { 1130 void WidgetWin::PaintLayeredWindow() {
1130 // Painting monkeys with our cliprect, so we need to save it so that the 1131 // Painting monkeys with our cliprect, so we need to save it so that the
1131 // call to UpdateLayeredWindow updates the entire window, not just the 1132 // call to UpdateLayeredWindow updates the entire window, not just the
1132 // cliprect. 1133 // cliprect.
1133 contents_->save(SkCanvas::kClip_SaveFlag); 1134 contents_->save(SkCanvas::kClip_SaveFlag);
1134 gfx::Rect dirty_rect = root_view_->GetScheduledPaintRect(); 1135 gfx::Rect dirty_rect = root_view_->GetScheduledPaintRect();
1135 contents_->ClipRectInt(dirty_rect.x(), dirty_rect.y(), dirty_rect.width(), 1136 contents_->ClipRectInt(dirty_rect.x(), dirty_rect.y(), dirty_rect.width(),
1136 dirty_rect.height()); 1137 dirty_rect.height());
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
1366 Widget* Widget::GetWidgetFromNativeWindow(gfx::NativeWindow native_window) { 1367 Widget* Widget::GetWidgetFromNativeWindow(gfx::NativeWindow native_window) {
1367 return Widget::GetWidgetFromNativeView(native_window); 1368 return Widget::GetWidgetFromNativeView(native_window);
1368 } 1369 }
1369 1370
1370 // static 1371 // static
1371 void Widget::NotifyLocaleChanged() { 1372 void Widget::NotifyLocaleChanged() {
1372 NOTIMPLEMENTED(); 1373 NOTIMPLEMENTED();
1373 } 1374 }
1374 1375
1375 } // namespace views 1376 } // namespace views
OLDNEW
« no previous file with comments | « views/widget/widget_win.h ('k') | views/window/dialog_client_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698