| 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 |
| 11 #include "base/message_loop.h" | 11 #include "base/message_loop.h" |
| 12 #include "ui/aura/client/capture_client.h" | 12 #include "ui/aura/client/capture_client.h" |
| 13 #include "ui/aura/env.h" | 13 #include "ui/aura/env.h" |
| 14 #include "ui/aura/root_window.h" | 14 #include "ui/aura/root_window.h" |
| 15 #include "ui/base/events/event.h" | 15 #include "ui/base/events/event.h" |
| 16 #include "ui/base/view_prop.h" | 16 #include "ui/base/view_prop.h" |
| 17 | 17 |
| 18 using std::max; | 18 using std::max; |
| 19 using std::min; | 19 using std::min; |
| 20 | 20 |
| 21 namespace aura { | 21 namespace aura { |
| 22 | 22 |
| 23 namespace { | 23 namespace { |
| 24 | 24 |
| 25 const char* kRootWindowHostWinKey = "__AURA_ROOT_WINDOW_HOST_WIN__"; | 25 const char* kRootWindowHostWinKey = "__AURA_ROOT_WINDOW_HOST_WIN__"; |
| 26 | 26 |
| 27 // TODO(mazda): Move the cursor code to ui/base/cursor/cursor_loader_win.{cc,h}. |
| 27 const wchar_t* GetCursorId(gfx::NativeCursor native_cursor) { | 28 const wchar_t* GetCursorId(gfx::NativeCursor native_cursor) { |
| 28 switch (native_cursor.native_type()) { | 29 switch (native_cursor.native_type()) { |
| 29 case ui::kCursorNull: | 30 case ui::kCursorNull: |
| 30 return IDC_ARROW; | 31 return IDC_ARROW; |
| 31 case ui::kCursorPointer: | 32 case ui::kCursorPointer: |
| 32 return IDC_ARROW; | 33 return IDC_ARROW; |
| 33 case ui::kCursorCross: | 34 case ui::kCursorCross: |
| 34 return IDC_CROSS; | 35 return IDC_CROSS; |
| 35 case ui::kCursorHand: | 36 case ui::kCursorHand: |
| 36 return IDC_HAND; | 37 return IDC_HAND; |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 } | 348 } |
| 348 | 349 |
| 349 void RootWindowHostWin::OnSize(UINT param, const CSize& size) { | 350 void RootWindowHostWin::OnSize(UINT param, const CSize& size) { |
| 350 // Minimizing resizes the window to 0x0 which causes our layout to go all | 351 // Minimizing resizes the window to 0x0 which causes our layout to go all |
| 351 // screwy, so we just ignore it. | 352 // screwy, so we just ignore it. |
| 352 if (param != SIZE_MINIMIZED) | 353 if (param != SIZE_MINIMIZED) |
| 353 delegate_->OnHostResized(gfx::Size(size.cx, size.cy)); | 354 delegate_->OnHostResized(gfx::Size(size.cx, size.cy)); |
| 354 } | 355 } |
| 355 | 356 |
| 356 } // namespace aura | 357 } // namespace aura |
| OLD | NEW |