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

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

Issue 7344: Convert GetPreferredSize from:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years, 2 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
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_container.h" 5 #include "chrome/views/hwnd_view_container.h"
6 6
7 #include "base/gfx/native_theme.h" 7 #include "base/gfx/native_theme.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "base/win_util.h" 9 #include "base/win_util.h"
10 #include "chrome/app/chrome_dll_resource.h" 10 #include "chrome/app/chrome_dll_resource.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 void FillLayout::Layout(View* host) { 52 void FillLayout::Layout(View* host) {
53 CRect bounds; 53 CRect bounds;
54 host->GetViewContainer()->GetBounds(&bounds, false); 54 host->GetViewContainer()->GetBounds(&bounds, false);
55 if (host->GetChildViewCount() == 0) 55 if (host->GetChildViewCount() == 0)
56 return; 56 return;
57 57
58 View* frame_view = host->GetChildViewAt(0); 58 View* frame_view = host->GetChildViewAt(0);
59 frame_view->SetBounds(CRect(CPoint(0, 0), bounds.Size())); 59 frame_view->SetBounds(CRect(CPoint(0, 0), bounds.Size()));
60 } 60 }
61 61
62 void FillLayout::GetPreferredSize(View* host, CSize* out) { 62 gfx::Size FillLayout::GetPreferredSize(View* host) {
63 DCHECK(host->GetChildViewCount() == 1); 63 DCHECK(host->GetChildViewCount() == 1);
64 host->GetChildViewAt(0)->GetPreferredSize(out); 64 return host->GetChildViewAt(0)->GetPreferredSize();
65 } 65 }
66 66
67 /////////////////////////////////////////////////////////////////////////////// 67 ///////////////////////////////////////////////////////////////////////////////
68 // Window class tracking. 68 // Window class tracking.
69 69
70 // static 70 // static
71 const wchar_t* const HWNDViewContainer::kBaseClassName = 71 const wchar_t* const HWNDViewContainer::kBaseClassName =
72 L"Chrome_HWNDViewContainer_"; 72 L"Chrome_HWNDViewContainer_";
73 73
74 // Window class information used for registering unique windows. 74 // Window class information used for registering unique windows.
(...skipping 844 matching lines...) Expand 10 before | Expand all | Expand 10 after
919 result = DefWindowProc(window, message, w_param, l_param); 919 result = DefWindowProc(window, message, w_param, l_param);
920 if (message == WM_NCDESTROY) { 920 if (message == WM_NCDESTROY) {
921 vc->hwnd_ = NULL; 921 vc->hwnd_ = NULL;
922 vc->OnFinalMessage(window); 922 vc->OnFinalMessage(window);
923 } 923 }
924 return result; 924 return result;
925 } 925 }
926 926
927 } // namespace ChromeViews 927 } // namespace ChromeViews
928 928
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698