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

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

Issue 21105: Add debugging info to hopefully catch what's causing 6316 (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 | « no previous file | 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 "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 13 matching lines...) Expand all
24 // know when the position of any ancestor changes, or our visibility relative 24 // know when the position of any ancestor changes, or our visibility relative
25 // to other views changed as it'll effect our position relative to the root. 25 // to other views changed as it'll effect our position relative to the root.
26 SetNotifyWhenVisibleBoundsInRootChanges(true); 26 SetNotifyWhenVisibleBoundsInRootChanges(true);
27 } 27 }
28 28
29 HWNDView::~HWNDView() { 29 HWNDView::~HWNDView() {
30 } 30 }
31 31
32 void HWNDView::Attach(HWND hwnd) { 32 void HWNDView::Attach(HWND hwnd) {
33 DCHECK(hwnd_ == NULL); 33 DCHECK(hwnd_ == NULL);
34 DCHECK(hwnd) << "Impossible detatched tab case; See crbug.com/6316";
35
34 hwnd_ = hwnd; 36 hwnd_ = hwnd;
35 37
36 // First hide the new window. We don't want anything to draw (like sub-hwnd 38 // First hide the new window. We don't want anything to draw (like sub-hwnd
37 // borders), when we change the parent below. 39 // borders), when we change the parent below.
38 ShowWindow(hwnd_, SW_HIDE); 40 ShowWindow(hwnd_, SW_HIDE);
39 41
40 // Need to set the HWND's parent before changing its size to avoid flashing. 42 // Need to set the HWND's parent before changing its size to avoid flashing.
41 ::SetParent(hwnd_, GetWidget()->GetHWND()); 43 ::SetParent(hwnd_, GetWidget()->GetHWND());
42 UpdateHWNDBounds(); 44 UpdateHWNDBounds();
43 45
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 if (installed_clip_) 186 if (installed_clip_)
185 canvas->FillRectInt(SkColorSetRGB(255, 255, 255), 0, 0, width(), height()); 187 canvas->FillRectInt(SkColorSetRGB(255, 255, 255), 0, 0, width(), height());
186 } 188 }
187 189
188 std::string HWNDView::GetClassName() const { 190 std::string HWNDView::GetClassName() const {
189 return kViewClassName; 191 return kViewClassName;
190 } 192 }
191 193
192 } // namespace views 194 } // namespace views
193 195
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698