| OLD | NEW |
| 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 "chrome/views/hwnd_view.h" | 5 #include "chrome/views/hwnd_view.h" |
| 6 | 6 |
| 7 #include "chrome/common/gfx/chrome_canvas.h" | 7 #include "chrome/common/gfx/chrome_canvas.h" |
| 8 #include "chrome/common/win_util.h" | 8 #include "chrome/common/win_util.h" |
| 9 #include "chrome/views/focus_manager.h" | 9 #include "chrome/views/focus_manager.h" |
| 10 #include "chrome/views/scroll_view.h" | 10 #include "chrome/views/scroll_view.h" |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 ::SetParent(hwnd_, NULL); | 167 ::SetParent(hwnd_, NULL); |
| 168 } | 168 } |
| 169 } | 169 } |
| 170 } | 170 } |
| 171 | 171 |
| 172 void HWNDView::VisibleBoundsInRootChanged() { | 172 void HWNDView::VisibleBoundsInRootChanged() { |
| 173 UpdateHWNDBounds(); | 173 UpdateHWNDBounds(); |
| 174 } | 174 } |
| 175 | 175 |
| 176 void HWNDView::Paint(ChromeCanvas* canvas) { | 176 void HWNDView::Paint(ChromeCanvas* canvas) { |
| 177 // On Vista, the area behind our window is black (due to the Aero Glass) | 177 // The area behind our window is black, so during a fast resize (where our |
| 178 // this means that during a fast resize (where our content doesn't draw | 178 // content doesn't draw over the full size of our HWND, and the HWND |
| 179 // over the full size of our HWND, and the HWND background color | 179 // background color doesn't show up), we need to cover that blackness with |
| 180 // doesn't show up), we need to cover that blackness with something so | 180 // something so that fast resizes don't result in black flash. |
| 181 // that fast resizes don't result in black flash. | |
| 182 // | 181 // |
| 183 // It would be nice if this used some approximation of the page's | 182 // It would be nice if this used some approximation of the page's |
| 184 // current background color. | 183 // current background color. |
| 185 if (installed_clip_ && win_util::ShouldUseVistaFrame()) | 184 if (installed_clip_) |
| 186 canvas->FillRectInt(SkColorSetRGB(255, 255, 255), 0, 0, width(), height()); | 185 canvas->FillRectInt(SkColorSetRGB(255, 255, 255), 0, 0, width(), height()); |
| 187 } | 186 } |
| 188 | 187 |
| 189 std::string HWNDView::GetClassName() const { | 188 std::string HWNDView::GetClassName() const { |
| 190 return kViewClassName; | 189 return kViewClassName; |
| 191 } | 190 } |
| 192 | 191 |
| 193 } // namespace views | 192 } // namespace views |
| 194 | 193 |
| OLD | NEW |