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

Side by Side Diff: ui/views/widget/native_widget_win.cc

Issue 10701063: Cleanup gfx::Canvas now that 10562027 has landed (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 | « ui/views/controls/tree/tree_view_win.cc ('k') | no next file » | 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) 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 "ui/views/widget/native_widget_win.h" 5 #include "ui/views/widget/native_widget_win.h"
6 6
7 #include <dwmapi.h> 7 #include <dwmapi.h>
8 #include <shellapi.h> 8 #include <shellapi.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 2493 matching lines...) Expand 10 before | Expand all | Expand 10 after
2504 void NativeWidgetWin::ClientAreaSizeChanged() { 2504 void NativeWidgetWin::ClientAreaSizeChanged() {
2505 RECT r; 2505 RECT r;
2506 if (WidgetSizeIsClientSize()) 2506 if (WidgetSizeIsClientSize())
2507 GetClientRect(&r); 2507 GetClientRect(&r);
2508 else 2508 else
2509 GetWindowRect(&r); 2509 GetWindowRect(&r);
2510 gfx::Size s(std::max(0, static_cast<int>(r.right - r.left)), 2510 gfx::Size s(std::max(0, static_cast<int>(r.right - r.left)),
2511 std::max(0, static_cast<int>(r.bottom - r.top))); 2511 std::max(0, static_cast<int>(r.bottom - r.top)));
2512 delegate_->OnNativeWidgetSizeChanged(s); 2512 delegate_->OnNativeWidgetSizeChanged(s);
2513 if (use_layered_buffer_) 2513 if (use_layered_buffer_)
2514 layered_window_contents_.reset(new gfx::Canvas(s, false)); 2514 layered_window_contents_.reset(
2515 new gfx::Canvas(s, ui::SCALE_FACTOR_100P, false));
2515 } 2516 }
2516 2517
2517 void NativeWidgetWin::UpdateDWMFrame() { 2518 void NativeWidgetWin::UpdateDWMFrame() {
2518 MARGINS m = {10, 10, 10, 10}; 2519 MARGINS m = {10, 10, 10, 10};
2519 DwmExtendFrameIntoClientArea(GetNativeView(), &m); 2520 DwmExtendFrameIntoClientArea(GetNativeView(), &m);
2520 } 2521 }
2521 2522
2522 void NativeWidgetWin::ResetWindowRegion(bool force) { 2523 void NativeWidgetWin::ResetWindowRegion(bool force) {
2523 // A native frame uses the native window region, and we don't want to mess 2524 // A native frame uses the native window region, and we don't want to mess
2524 // with it. 2525 // with it.
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
2767 // static 2768 // static
2768 bool NativeWidgetPrivate::IsTouchDown() { 2769 bool NativeWidgetPrivate::IsTouchDown() {
2769 // This currently isn't necessary because we're not generating touch events on 2770 // This currently isn't necessary because we're not generating touch events on
2770 // windows. When we do, this will need to be updated. 2771 // windows. When we do, this will need to be updated.
2771 return false; 2772 return false;
2772 } 2773 }
2773 2774
2774 } // namespace internal 2775 } // namespace internal
2775 2776
2776 } // namespace views 2777 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/tree/tree_view_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698