| 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/native_widget_win.h" | 5 #include "ui/views/widget/native_widget_win.h" |
| 6 | 6 |
| 7 #include <dwmapi.h> | 7 #include <dwmapi.h> |
| 8 #include <shellapi.h> | 8 #include <shellapi.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 1595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1606 // side-effects (ex/ stifling non-client mouse releases). | 1606 // side-effects (ex/ stifling non-client mouse releases). |
| 1607 DefWindowProcWithRedrawLock(message, w_param, l_param); | 1607 DefWindowProcWithRedrawLock(message, w_param, l_param); |
| 1608 handled = true; | 1608 handled = true; |
| 1609 } | 1609 } |
| 1610 | 1610 |
| 1611 SetMsgHandled(handled); | 1611 SetMsgHandled(handled); |
| 1612 return 0; | 1612 return 0; |
| 1613 } | 1613 } |
| 1614 | 1614 |
| 1615 void NativeWidgetWin::OnMove(const CPoint& point) { | 1615 void NativeWidgetWin::OnMove(const CPoint& point) { |
| 1616 // TODO(beng): move to Widget. | 1616 delegate_->OnNativeWidgetMove(); |
| 1617 GetWidget()->widget_delegate()->OnWidgetMove(); | |
| 1618 SetMsgHandled(FALSE); | 1617 SetMsgHandled(FALSE); |
| 1619 } | 1618 } |
| 1620 | 1619 |
| 1621 void NativeWidgetWin::OnMoving(UINT param, const LPRECT new_bounds) { | 1620 void NativeWidgetWin::OnMoving(UINT param, const LPRECT new_bounds) { |
| 1622 // TODO(beng): move to Widget. | 1621 delegate_->OnNativeWidgetMove(); |
| 1623 GetWidget()->widget_delegate()->OnWidgetMove(); | |
| 1624 } | 1622 } |
| 1625 | 1623 |
| 1626 LRESULT NativeWidgetWin::OnNCActivate(BOOL active) { | 1624 LRESULT NativeWidgetWin::OnNCActivate(BOOL active) { |
| 1627 if (delegate_->CanActivate()) | 1625 if (delegate_->CanActivate()) |
| 1628 delegate_->OnNativeWidgetActivationChanged(!!active); | 1626 delegate_->OnNativeWidgetActivationChanged(!!active); |
| 1629 | 1627 |
| 1630 if (!GetWidget()->non_client_view()) { | 1628 if (!GetWidget()->non_client_view()) { |
| 1631 SetMsgHandled(FALSE); | 1629 SetMsgHandled(FALSE); |
| 1632 return 0; | 1630 return 0; |
| 1633 } | 1631 } |
| (...skipping 1014 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2648 return (GetKeyState(VK_LBUTTON) & 0x80) || | 2646 return (GetKeyState(VK_LBUTTON) & 0x80) || |
| 2649 (GetKeyState(VK_RBUTTON) & 0x80) || | 2647 (GetKeyState(VK_RBUTTON) & 0x80) || |
| 2650 (GetKeyState(VK_MBUTTON) & 0x80) || | 2648 (GetKeyState(VK_MBUTTON) & 0x80) || |
| 2651 (GetKeyState(VK_XBUTTON1) & 0x80) || | 2649 (GetKeyState(VK_XBUTTON1) & 0x80) || |
| 2652 (GetKeyState(VK_XBUTTON2) & 0x80); | 2650 (GetKeyState(VK_XBUTTON2) & 0x80); |
| 2653 } | 2651 } |
| 2654 | 2652 |
| 2655 } // namespace internal | 2653 } // namespace internal |
| 2656 | 2654 |
| 2657 } // namespace views | 2655 } // namespace views |
| OLD | NEW |