summaryrefslogtreecommitdiffstats
path: root/views/controls/native/native_view_host.cc
diff options
context:
space:
mode:
Diffstat (limited to 'views/controls/native/native_view_host.cc')
-rw-r--r--views/controls/native/native_view_host.cc13
1 files changed, 8 insertions, 5 deletions
diff --git a/views/controls/native/native_view_host.cc b/views/controls/native/native_view_host.cc
index 81f1f2f..4566b80 100644
--- a/views/controls/native/native_view_host.cc
+++ b/views/controls/native/native_view_host.cc
@@ -33,10 +33,6 @@ NativeViewHost::NativeViewHost()
views_view_(NULL),
fast_resize_(false),
focus_view_(NULL) {
- // The native widget is placed relative to the root. As such, we need to
- // know when the position of any ancestor changes, or our visibility relative
- // to other views changed as it'll effect our position relative to the root.
- SetNotifyWhenVisibleBoundsInRootChanges(true);
}
NativeViewHost::~NativeViewHost() {
@@ -156,7 +152,14 @@ void NativeViewHost::VisibilityChanged(View* starting_from, bool is_visible) {
Layout();
}
-void NativeViewHost::VisibleBoundsInRootChanged() {
+bool NativeViewHost::NeedsNotificationWhenVisibleBoundsChange() const {
+ // The native widget is placed relative to the root. As such, we need to
+ // know when the position of any ancestor changes, or our visibility relative
+ // to other views changed as it'll effect our position relative to the root.
+ return true;
+}
+
+void NativeViewHost::OnVisibleBoundsChanged() {
Layout();
}