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 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 void RootWindowHostWin::PostNativeEvent(const base::NativeEvent& native_event) { | 297 void RootWindowHostWin::PostNativeEvent(const base::NativeEvent& native_event) { |
298 ::PostMessage( | 298 ::PostMessage( |
299 hwnd(), native_event.message, native_event.wParam, native_event.lParam); | 299 hwnd(), native_event.message, native_event.wParam, native_event.lParam); |
300 } | 300 } |
301 | 301 |
302 void RootWindowHostWin::OnDeviceScaleFactorChanged( | 302 void RootWindowHostWin::OnDeviceScaleFactorChanged( |
303 float device_scale_factor) { | 303 float device_scale_factor) { |
304 NOTIMPLEMENTED(); | 304 NOTIMPLEMENTED(); |
305 } | 305 } |
306 | 306 |
| 307 void RootWindowHostWin::PrepareForShutdown() { |
| 308 NOTIMPLEMENTED(); |
| 309 } |
| 310 |
307 void RootWindowHostWin::OnClose() { | 311 void RootWindowHostWin::OnClose() { |
308 // TODO: this obviously shouldn't be here. | 312 // TODO: this obviously shouldn't be here. |
309 MessageLoopForUI::current()->Quit(); | 313 MessageLoopForUI::current()->Quit(); |
310 } | 314 } |
311 | 315 |
312 LRESULT RootWindowHostWin::OnKeyEvent(UINT message, | 316 LRESULT RootWindowHostWin::OnKeyEvent(UINT message, |
313 WPARAM w_param, | 317 WPARAM w_param, |
314 LPARAM l_param) { | 318 LPARAM l_param) { |
315 MSG msg = { hwnd(), message, w_param, l_param }; | 319 MSG msg = { hwnd(), message, w_param, l_param }; |
316 ui::KeyEvent keyev(msg, message == WM_CHAR); | 320 ui::KeyEvent keyev(msg, message == WM_CHAR); |
(...skipping 30 matching lines...) Expand all Loading... |
347 } | 351 } |
348 | 352 |
349 void RootWindowHostWin::OnSize(UINT param, const CSize& size) { | 353 void RootWindowHostWin::OnSize(UINT param, const CSize& size) { |
350 // Minimizing resizes the window to 0x0 which causes our layout to go all | 354 // Minimizing resizes the window to 0x0 which causes our layout to go all |
351 // screwy, so we just ignore it. | 355 // screwy, so we just ignore it. |
352 if (param != SIZE_MINIMIZED) | 356 if (param != SIZE_MINIMIZED) |
353 delegate_->OnHostResized(gfx::Size(size.cx, size.cy)); | 357 delegate_->OnHostResized(gfx::Size(size.cx, size.cy)); |
354 } | 358 } |
355 | 359 |
356 } // namespace aura | 360 } // namespace aura |
OLD | NEW |