window: adding resize and move events

This commit is contained in:
deepak1556 2015-05-09 21:25:10 +05:30
parent d34800bb0a
commit 3a5977e09f
10 changed files with 81 additions and 5 deletions

View file

@ -720,6 +720,22 @@ void NativeWindowViews::OnWidgetActivationChanged(
SetMenuBarVisibility(false);
}
void NativeWindowViews::OnWidgetBoundsChanged(
views::Widget* widget, const gfx::Rect& bounds) {
if (widget != window_.get())
return;
if (widget_size_ != bounds.size()) {
NotifyWindowResize();
widget_size_ = bounds.size();
}
if (widget_pos_ != bounds.origin()) {
NotifyWindowMove();
widget_pos_ = bounds.origin();
}
}
void NativeWindowViews::DeleteDelegate() {
NotifyWindowClosed();
}