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

Side by Side Diff: views/window/window_win.cc

Issue 113443: ChromeCanvas->gfx::Canvas (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 7 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/window/dialog_client_view.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) 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/window/window_win.h" 5 #include "views/window/window_win.h"
6 6
7 #include <shellapi.h> 7 #include <shellapi.h>
8 8
9 #include "app/gfx/chrome_canvas.h" 9 #include "app/gfx/canvas.h"
10 #include "app/gfx/chrome_font.h" 10 #include "app/gfx/font.h"
11 #include "app/gfx/icon_util.h" 11 #include "app/gfx/icon_util.h"
12 #include "app/gfx/path.h" 12 #include "app/gfx/path.h"
13 #include "app/l10n_util.h" 13 #include "app/l10n_util.h"
14 #include "app/resource_bundle.h" 14 #include "app/resource_bundle.h"
15 #include "app/win_util.h" 15 #include "app/win_util.h"
16 #include "base/win_util.h" 16 #include "base/win_util.h"
17 #include "grit/generated_resources.h" 17 #include "grit/generated_resources.h"
18 #include "views/widget/root_view.h" 18 #include "views/widget/root_view.h"
19 #include "views/window/client_view.h" 19 #include "views/window/client_view.h"
20 #include "views/window/custom_frame_view.h" 20 #include "views/window/custom_frame_view.h"
(...skipping 834 matching lines...) Expand 10 before | Expand all | Expand 10 after
855 // The root view has a region that needs to be painted. Include it in the 855 // The root view has a region that needs to be painted. Include it in the
856 // region we're going to paint. 856 // region we're going to paint.
857 857
858 CRect old_paint_region_crect = old_paint_region.ToRECT(); 858 CRect old_paint_region_crect = old_paint_region.ToRECT();
859 CRect tmp = dirty_region; 859 CRect tmp = dirty_region;
860 UnionRect(&dirty_region, &tmp, &old_paint_region_crect); 860 UnionRect(&dirty_region, &tmp, &old_paint_region_crect);
861 } 861 }
862 862
863 root_view->SchedulePaint(gfx::Rect(dirty_region), false); 863 root_view->SchedulePaint(gfx::Rect(dirty_region), false);
864 864
865 // ChromeCanvasPaints destructor does the actual painting. As such, wrap the 865 // gfx::CanvasPaints destructor does the actual painting. As such, wrap the
866 // following in a block to force paint to occur so that we can release the dc. 866 // following in a block to force paint to occur so that we can release the dc.
867 { 867 {
868 ChromeCanvasPaint canvas(dc, opaque(), dirty_region.left, dirty_region.top, 868 gfx::CanvasPaint canvas(dc, opaque(), dirty_region.left, dirty_region.top,
869 dirty_region.Width(), dirty_region.Height()); 869 dirty_region.Width(), dirty_region.Height());
870 870
871 root_view->ProcessPaint(&canvas); 871 root_view->ProcessPaint(&canvas);
872 } 872 }
873 873
874 ReleaseDC(GetNativeView(), dc); 874 ReleaseDC(GetNativeView(), dc);
875 } 875 }
876 876
877 void WindowWin::OnNCLButtonDown(UINT ht_component, const CPoint& point) { 877 void WindowWin::OnNCLButtonDown(UINT ht_component, const CPoint& point) {
878 // When we're using a native frame, window controls work without us 878 // When we're using a native frame, window controls work without us
879 // interfering. 879 // interfering.
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
1371 } 1371 }
1372 return TRUE; 1372 return TRUE;
1373 } 1373 }
1374 } // namespace 1374 } // namespace
1375 1375
1376 void Window::CloseAllSecondaryWindows() { 1376 void Window::CloseAllSecondaryWindows() {
1377 EnumThreadWindows(GetCurrentThreadId(), WindowCallbackProc, 0); 1377 EnumThreadWindows(GetCurrentThreadId(), WindowCallbackProc, 0);
1378 } 1378 }
1379 1379
1380 } // namespace views 1380 } // namespace views
OLDNEW
« no previous file with comments | « views/window/dialog_client_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698