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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 handled = delegate_->OnHostMouseEvent(&event); | 238 handled = delegate_->OnHostMouseEvent(&event); |
239 SetMsgHandled(handled); | 239 SetMsgHandled(handled); |
240 return 0; | 240 return 0; |
241 } | 241 } |
242 | 242 |
243 LRESULT RootWindowHostWin::OnCaptureChanged(UINT message, | 243 LRESULT RootWindowHostWin::OnCaptureChanged(UINT message, |
244 WPARAM w_param, | 244 WPARAM w_param, |
245 LPARAM l_param) { | 245 LPARAM l_param) { |
246 if (has_capture_) { | 246 if (has_capture_) { |
247 has_capture_ = false; | 247 has_capture_ = false; |
248 delegate_->OnHostLostCapture(); | 248 delegate_->OnHostLostWindowCapture(); |
249 } | 249 } |
250 return 0; | 250 return 0; |
251 } | 251 } |
252 | 252 |
253 void RootWindowHostWin::OnPaint(HDC dc) { | 253 void RootWindowHostWin::OnPaint(HDC dc) { |
254 delegate_->OnHostPaint(); | 254 delegate_->OnHostPaint(); |
255 ValidateRect(hwnd(), NULL); | 255 ValidateRect(hwnd(), NULL); |
256 } | 256 } |
257 | 257 |
258 void RootWindowHostWin::OnSize(UINT param, const CSize& size) { | 258 void RootWindowHostWin::OnSize(UINT param, const CSize& size) { |
259 // Minimizing resizes the window to 0x0 which causes our layout to go all | 259 // Minimizing resizes the window to 0x0 which causes our layout to go all |
260 // screwy, so we just ignore it. | 260 // screwy, so we just ignore it. |
261 if (param != SIZE_MINIMIZED) | 261 if (param != SIZE_MINIMIZED) |
262 delegate_->OnHostResized(gfx::Size(size.cx, size.cy)); | 262 delegate_->OnHostResized(gfx::Size(size.cx, size.cy)); |
263 } | 263 } |
264 | 264 |
265 } // namespace aura | 265 } // namespace aura |
OLD | NEW |