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

Side by Side Diff: views/controls/hwnd_view.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/controls/hwnd_view.h ('k') | views/controls/image_view.h » ('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) 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/controls/hwnd_view.h" 5 #include "views/controls/hwnd_view.h"
6 6
7 #include "app/gfx/chrome_canvas.h" 7 #include "app/gfx/canvas.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "views/focus/focus_manager.h" 9 #include "views/focus/focus_manager.h"
10 #include "views/widget/widget.h" 10 #include "views/widget/widget.h"
11 11
12 namespace views { 12 namespace views {
13 13
14 static const char kViewClassName[] = "views/HWNDView"; 14 static const char kViewClassName[] = "views/HWNDView";
15 15
16 HWNDView::HWNDView() { 16 HWNDView::HWNDView() {
17 } 17 }
(...skipping 21 matching lines...) Expand all
39 hwnd, associated_focus_view() ? associated_focus_view() : this); 39 hwnd, associated_focus_view() ? associated_focus_view() : this);
40 } 40 }
41 41
42 void HWNDView::Detach() { 42 void HWNDView::Detach() {
43 DCHECK(native_view()); 43 DCHECK(native_view());
44 FocusManager::UninstallFocusSubclass(native_view()); 44 FocusManager::UninstallFocusSubclass(native_view());
45 set_native_view(NULL); 45 set_native_view(NULL);
46 set_installed_clip(false); 46 set_installed_clip(false);
47 } 47 }
48 48
49 void HWNDView::Paint(ChromeCanvas* canvas) { 49 void HWNDView::Paint(gfx::Canvas* canvas) {
50 // The area behind our window is black, so during a fast resize (where our 50 // The area behind our window is black, so during a fast resize (where our
51 // content doesn't draw over the full size of our HWND, and the HWND 51 // content doesn't draw over the full size of our HWND, and the HWND
52 // background color doesn't show up), we need to cover that blackness with 52 // background color doesn't show up), we need to cover that blackness with
53 // something so that fast resizes don't result in black flash. 53 // something so that fast resizes don't result in black flash.
54 // 54 //
55 // It would be nice if this used some approximation of the page's 55 // It would be nice if this used some approximation of the page's
56 // current background color. 56 // current background color.
57 if (installed_clip()) 57 if (installed_clip())
58 canvas->FillRectInt(SkColorSetRGB(255, 255, 255), 0, 0, width(), height()); 58 canvas->FillRectInt(SkColorSetRGB(255, 255, 255), 0, 0, width(), height());
59 } 59 }
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 return; // Currently not visible, nothing to do. 129 return; // Currently not visible, nothing to do.
130 130
131 // The window is currently visible, but its clipped by another view. Hide 131 // The window is currently visible, but its clipped by another view. Hide
132 // it. 132 // it.
133 ::SetWindowPos(native_view(), 0, 0, 0, 0, 0, 133 ::SetWindowPos(native_view(), 0, 0, 0, 0, 0,
134 SWP_HIDEWINDOW | SWP_NOSIZE | SWP_NOMOVE | SWP_NOZORDER | 134 SWP_HIDEWINDOW | SWP_NOSIZE | SWP_NOMOVE | SWP_NOZORDER |
135 SWP_NOREDRAW | SWP_NOOWNERZORDER); 135 SWP_NOREDRAW | SWP_NOOWNERZORDER);
136 } 136 }
137 137
138 } // namespace views 138 } // namespace views
OLDNEW
« no previous file with comments | « views/controls/hwnd_view.h ('k') | views/controls/image_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698