| 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/views/widget/desktop_aura/desktop_window_tree_host_win.h" | 5 #include "ui/views/widget/desktop_aura/desktop_window_tree_host_win.h" |
| 6 | 6 |
| 7 #include "base/win/metro.h" | 7 #include "base/win/metro.h" |
| 8 #include "third_party/skia/include/core/SkPath.h" | 8 #include "third_party/skia/include/core/SkPath.h" |
| 9 #include "third_party/skia/include/core/SkRegion.h" | 9 #include "third_party/skia/include/core/SkRegion.h" |
| 10 #include "ui/aura/client/aura_constants.h" | 10 #include "ui/aura/client/aura_constants.h" |
| (...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 505 } | 505 } |
| 506 | 506 |
| 507 void DesktopWindowTreeHostWin::SetCapture() { | 507 void DesktopWindowTreeHostWin::SetCapture() { |
| 508 message_handler_->SetCapture(); | 508 message_handler_->SetCapture(); |
| 509 } | 509 } |
| 510 | 510 |
| 511 void DesktopWindowTreeHostWin::ReleaseCapture() { | 511 void DesktopWindowTreeHostWin::ReleaseCapture() { |
| 512 message_handler_->ReleaseCapture(); | 512 message_handler_->ReleaseCapture(); |
| 513 } | 513 } |
| 514 | 514 |
| 515 bool DesktopWindowTreeHostWin::QueryMouseLocation(gfx::Point* location_return) { | |
| 516 aura::client::CursorClient* cursor_client = | |
| 517 aura::client::GetCursorClient(window()); | |
| 518 if (cursor_client && !cursor_client->IsMouseEventsEnabled()) { | |
| 519 *location_return = gfx::Point(0, 0); | |
| 520 return false; | |
| 521 } | |
| 522 POINT pt = {0}; | |
| 523 ::GetCursorPos(&pt); | |
| 524 *location_return = | |
| 525 gfx::Point(static_cast<int>(pt.x), static_cast<int>(pt.y)); | |
| 526 return true; | |
| 527 } | |
| 528 | |
| 529 void DesktopWindowTreeHostWin::PostNativeEvent( | 515 void DesktopWindowTreeHostWin::PostNativeEvent( |
| 530 const base::NativeEvent& native_event) { | 516 const base::NativeEvent& native_event) { |
| 531 } | 517 } |
| 532 | 518 |
| 533 void DesktopWindowTreeHostWin::OnDeviceScaleFactorChanged( | 519 void DesktopWindowTreeHostWin::OnDeviceScaleFactorChanged( |
| 534 float device_scale_factor) { | 520 float device_scale_factor) { |
| 535 } | 521 } |
| 536 | 522 |
| 537 void DesktopWindowTreeHostWin::SetCursorNative(gfx::NativeCursor cursor) { | 523 void DesktopWindowTreeHostWin::SetCursorNative(gfx::NativeCursor cursor) { |
| 538 ui::CursorLoaderWin cursor_loader; | 524 ui::CursorLoaderWin cursor_loader; |
| (...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 981 | 967 |
| 982 // static | 968 // static |
| 983 DesktopWindowTreeHost* DesktopWindowTreeHost::Create( | 969 DesktopWindowTreeHost* DesktopWindowTreeHost::Create( |
| 984 internal::NativeWidgetDelegate* native_widget_delegate, | 970 internal::NativeWidgetDelegate* native_widget_delegate, |
| 985 DesktopNativeWidgetAura* desktop_native_widget_aura) { | 971 DesktopNativeWidgetAura* desktop_native_widget_aura) { |
| 986 return new DesktopWindowTreeHostWin(native_widget_delegate, | 972 return new DesktopWindowTreeHostWin(native_widget_delegate, |
| 987 desktop_native_widget_aura); | 973 desktop_native_widget_aura); |
| 988 } | 974 } |
| 989 | 975 |
| 990 } // namespace views | 976 } // namespace views |
| OLD | NEW |