diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-21 20:51:20 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-21 20:51:20 +0000 |
commit | a0dde12f2e4f92f1a59885c45cfecd10dbfdfdfd (patch) | |
tree | d8283a980977f11c43542016d57f698d3a83b73d /chrome/views/hwnd_view.cc | |
parent | 933cc00eb856db684b9e64b7486ca20edbb2c3ea (diff) | |
download | chromium_src-a0dde12f2e4f92f1a59885c45cfecd10dbfdfdfd.zip chromium_src-a0dde12f2e4f92f1a59885c45cfecd10dbfdfdfd.tar.gz chromium_src-a0dde12f2e4f92f1a59885c45cfecd10dbfdfdfd.tar.bz2 |
Rename Container->Widget
R=erg
review url = http://codereview.chromium.org/11348/show
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5849 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/views/hwnd_view.cc')
-rw-r--r-- | chrome/views/hwnd_view.cc | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/chrome/views/hwnd_view.cc b/chrome/views/hwnd_view.cc index 9a4ab30..22990fb 100644 --- a/chrome/views/hwnd_view.cc +++ b/chrome/views/hwnd_view.cc @@ -6,9 +6,9 @@ #include "chrome/common/gfx/chrome_canvas.h" #include "chrome/common/win_util.h" -#include "chrome/views/container.h" #include "chrome/views/focus_manager.h" #include "chrome/views/scroll_view.h" +#include "chrome/views/widget.h" #include "base/logging.h" namespace views { @@ -38,7 +38,7 @@ void HWNDView::Attach(HWND hwnd) { ShowWindow(hwnd_, SW_HIDE); // Need to set the HWND's parent before changing its size to avoid flashing. - ::SetParent(hwnd_, GetContainer()->GetHWND()); + ::SetParent(hwnd_, GetWidget()->GetHWND()); UpdateHWNDBounds(); // Register with the focus manager so the associated view is focused when the @@ -67,11 +67,11 @@ void HWNDView::UpdateHWNDBounds() { return; // Since HWNDs know nothing about the View hierarchy (they are direct - // children of the Container that hosts our View hierarchy) they need to be - // positioned in the coordinate system of the Container, not the current + // children of the Widget that hosts our View hierarchy) they need to be + // positioned in the coordinate system of the Widget, not the current // view. gfx::Point top_left; - ConvertPointToContainer(this, &top_left); + ConvertPointToWidget(this, &top_left); gfx::Rect vis_bounds = GetVisibleBounds(); bool visible = !vis_bounds.IsEmpty(); @@ -150,12 +150,12 @@ gfx::Size HWNDView::GetPreferredSize() { void HWNDView::ViewHierarchyChanged(bool is_add, View *parent, View *child) { if (hwnd_) { - Container* vc = GetContainer(); - if (is_add && vc) { + Widget* widget = GetWidget(); + if (is_add && widget) { HWND parent = ::GetParent(hwnd_); - HWND vc_hwnd = vc->GetHWND(); - if (parent != vc_hwnd) { - ::SetParent(hwnd_, vc_hwnd); + HWND widget_hwnd = widget->GetHWND(); + if (parent != widget_hwnd) { + ::SetParent(hwnd_, widget_hwnd); } if (IsVisibleInRootView()) ::ShowWindow(hwnd_, SW_SHOW); |