diff options
author | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-23 22:30:16 +0000 |
---|---|---|
committer | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-23 22:30:16 +0000 |
commit | 34e32cf2dda2b1f4d5221749ddaac10690b8a63f (patch) | |
tree | 989cbf8baf6c21d21a0880b3a8d6ad7a12c3c985 /views/controls/native_control_win.cc | |
parent | 42ecb863ac38c351dd79f4b49f501f4bbd667cac (diff) | |
download | chromium_src-34e32cf2dda2b1f4d5221749ddaac10690b8a63f.zip chromium_src-34e32cf2dda2b1f4d5221749ddaac10690b8a63f.tar.gz chromium_src-34e32cf2dda2b1f4d5221749ddaac10690b8a63f.tar.bz2 |
Refactor window impl of scroll bar for future linux implementation.
- Changed NativeScrollBar to use native wrapper
- Added NativeScrollBarWapper for NativeScrollBar to delegate operations to
native control.
- Moved window specific impl in NativeScrollBar to NativeScrollBarWin class
which is a native wrapper.
- Fixed a bug in native_control_win. need to call Layout when
view visibility is changed after native contol is created.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/214048
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27013 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/controls/native_control_win.cc')
-rw-r--r-- | views/controls/native_control_win.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/views/controls/native_control_win.cc b/views/controls/native_control_win.cc index 406b470..9f4d2d6 100644 --- a/views/controls/native_control_win.cc +++ b/views/controls/native_control_win.cc @@ -78,7 +78,12 @@ void NativeControlWin::VisibilityChanged(View* starting_from, bool is_visible) { Detach(); DestroyWindow(hwnd); } else if (!native_view()) { - CreateNativeControl(); + if (GetWidget()) + CreateNativeControl(); + } else { + // The view becomes visible after native control is created. + // Layout now. + Layout(); } } |