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

Side by Side Diff: chrome/views/hwnd_view.cc

Issue 21439: Fix for focus traversal issue in Gears dialogs (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 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 | « chrome/views/hwnd_view.h ('k') | chrome/views/window_delegate.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 "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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 ::ShowWindow(hwnd_, SW_HIDE); 164 ::ShowWindow(hwnd_, SW_HIDE);
165 ::SetParent(hwnd_, NULL); 165 ::SetParent(hwnd_, NULL);
166 } 166 }
167 } 167 }
168 } 168 }
169 169
170 void HWNDView::VisibleBoundsInRootChanged() { 170 void HWNDView::VisibleBoundsInRootChanged() {
171 UpdateHWNDBounds(); 171 UpdateHWNDBounds();
172 } 172 }
173 173
174 void HWNDView::Focus() {
175 ::SetFocus(hwnd_);
176 }
177
174 void HWNDView::Paint(ChromeCanvas* canvas) { 178 void HWNDView::Paint(ChromeCanvas* canvas) {
175 // The area behind our window is black, so during a fast resize (where our 179 // The area behind our window is black, so during a fast resize (where our
176 // content doesn't draw over the full size of our HWND, and the HWND 180 // content doesn't draw over the full size of our HWND, and the HWND
177 // background color doesn't show up), we need to cover that blackness with 181 // background color doesn't show up), we need to cover that blackness with
178 // something so that fast resizes don't result in black flash. 182 // something so that fast resizes don't result in black flash.
179 // 183 //
180 // It would be nice if this used some approximation of the page's 184 // It would be nice if this used some approximation of the page's
181 // current background color. 185 // current background color.
182 if (installed_clip_) 186 if (installed_clip_)
183 canvas->FillRectInt(SkColorSetRGB(255, 255, 255), 0, 0, width(), height()); 187 canvas->FillRectInt(SkColorSetRGB(255, 255, 255), 0, 0, width(), height());
184 } 188 }
185 189
186 std::string HWNDView::GetClassName() const { 190 std::string HWNDView::GetClassName() const {
187 return kViewClassName; 191 return kViewClassName;
188 } 192 }
189 193
190 } // namespace views 194 } // namespace views
191 195
OLDNEW
« no previous file with comments | « chrome/views/hwnd_view.h ('k') | chrome/views/window_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698