Emit("move");
}
+void Window::OnWindowMoved() {
+ Emit("moved");
+}
+
void Window::OnWindowEnterFullScreen() {
Emit("enter-full-screen");
}
void OnWindowRestore() override;
void OnWindowResize() override;
void OnWindowMove() override;
+ void OnWindowMoved() override;
void OnWindowEnterFullScreen() override;
void OnWindowLeaveFullScreen() override;
void OnWindowEnterHtmlFullScreen() override;
FOR_EACH_OBSERVER(NativeWindowObserver, observers_, OnWindowMove());
}
+void NativeWindow::NotifyWindowMoved() {
+ FOR_EACH_OBSERVER(NativeWindowObserver, observers_, OnWindowMoved());
+}
+
void NativeWindow::NotifyWindowEnterFullScreen() {
FOR_EACH_OBSERVER(NativeWindowObserver, observers_,
OnWindowEnterFullScreen());
void NotifyWindowRestore();
void NotifyWindowMove();
void NotifyWindowResize();
+ void NotifyWindowMoved();
void NotifyWindowEnterFullScreen();
void NotifyWindowLeaveFullScreen();
void NotifyWindowEnterHtmlFullScreen();
}
- (void)windowDidMove:(NSNotification*)notification {
+ // TODO(zcbenz): Remove the alias after figuring out a proper
+ // way to disptach move.
shell_->NotifyWindowMove();
+ shell_->NotifyWindowMoved();
}
- (void)windowDidMiniaturize:(NSNotification*)notification {
virtual void OnWindowRestore() {}
virtual void OnWindowResize() {}
virtual void OnWindowMove() {}
+ virtual void OnWindowMoved() {}
virtual void OnWindowEnterFullScreen() {}
virtual void OnWindowLeaveFullScreen() {}
virtual void OnWindowEnterHtmlFullScreen() {}
options.Get(switches::kWidth, &width);
options.Get(switches::kHeight, &height);
gfx::Rect bounds(0, 0, width, height);
+ widget_size_ = bounds.size();
window_->AddObserver(this);
### Event: 'resize'
-Emitted when window is getting resized on all platforms.
+Emitted when window is getting resized.
### Event: 'move'
-Emitted once when the window is moved to a new position on `OSX` and emitted during the process
-of moving on `Linux` and `Windows`.
+Emitted when the window is getting moved to a new position.
+
+### Event: 'moved'
+
+Emitted once when the window is moved to a new position.
### Event: 'enter-full-screen'