OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ui/aura/root_window_host_win.h" | 5 #include "ui/aura/root_window_host_win.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 | 10 |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 } | 257 } |
258 | 258 |
259 LRESULT RootWindowHostWin::OnNCActivate(UINT message, | 259 LRESULT RootWindowHostWin::OnNCActivate(UINT message, |
260 WPARAM w_param, | 260 WPARAM w_param, |
261 LPARAM l_param) { | 261 LPARAM l_param) { |
262 if (!!w_param) | 262 if (!!w_param) |
263 delegate_->OnHostActivated(); | 263 delegate_->OnHostActivated(); |
264 return DefWindowProc(hwnd(), message, w_param, l_param); | 264 return DefWindowProc(hwnd(), message, w_param, l_param); |
265 } | 265 } |
266 | 266 |
| 267 void RootWindowHostWin::OnMove(const CPoint& point) { |
| 268 if (delegate_) |
| 269 delegate_->OnHostMoved(gfx::Point(point.x, point.y)); |
| 270 } |
| 271 |
267 void RootWindowHostWin::OnPaint(HDC dc) { | 272 void RootWindowHostWin::OnPaint(HDC dc) { |
268 delegate_->OnHostPaint(); | 273 delegate_->OnHostPaint(); |
269 ValidateRect(hwnd(), NULL); | 274 ValidateRect(hwnd(), NULL); |
270 } | 275 } |
271 | 276 |
272 void RootWindowHostWin::OnSize(UINT param, const CSize& size) { | 277 void RootWindowHostWin::OnSize(UINT param, const CSize& size) { |
273 // Minimizing resizes the window to 0x0 which causes our layout to go all | 278 // Minimizing resizes the window to 0x0 which causes our layout to go all |
274 // screwy, so we just ignore it. | 279 // screwy, so we just ignore it. |
275 if (param != SIZE_MINIMIZED) | 280 if (param != SIZE_MINIMIZED) |
276 delegate_->OnHostResized(gfx::Size(size.cx, size.cy)); | 281 delegate_->OnHostResized(gfx::Size(size.cx, size.cy)); |
277 } | 282 } |
278 | 283 |
279 } // namespace aura | 284 } // namespace aura |
OLD | NEW |