File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -139,6 +139,29 @@ - (void)windowDidDeminiaturize:(NSNotification *)notification {
139
139
shell_->SendEvent (" restore" );
140
140
}
141
141
142
+ - (void )windowDidMove : (NSNotification *)notification {
143
+ if (shell_) {
144
+ gfx::Point origin =
145
+ static_cast <nw::NativeWindowCocoa*>(shell_->window ())->GetPosition ();
146
+ base::ListValue args;
147
+ args.AppendInteger (origin.x ());
148
+ args.AppendInteger (origin.y ());
149
+ shell_->SendEvent (" move" , args);
150
+ }
151
+ }
152
+
153
+ - (void )windowDidResize : (NSNotification *)notification {
154
+ if (shell_) {
155
+ NSWindow * window =
156
+ static_cast <nw::NativeWindowCocoa*>(shell_->window ())->window ();
157
+ NSRect frame = [window frame ];
158
+ base::ListValue args;
159
+ args.AppendInteger (frame.size .width );
160
+ args.AppendInteger (frame.size .height );
161
+ shell_->SendEvent (" resize" , args);
162
+ }
163
+ }
164
+
142
165
- (BOOL )windowShouldZoom : (NSWindow *)window toFrame : (NSRect )newFrame {
143
166
// Cocoa doen't have concept of maximize/unmaximize, so wee need to emulate
144
167
// them by calculating size change when zooming.
You can’t perform that action at this time.
0 commit comments