| 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 653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 664 input_method->Init(GetWidget()); | 664 input_method->Init(GetWidget()); |
| 665 return input_method; | 665 return input_method; |
| 666 } | 666 } |
| 667 return NULL; | 667 return NULL; |
| 668 } | 668 } |
| 669 | 669 |
| 670 void NativeWidgetWin::CenterWindow(const gfx::Size& size) { | 670 void NativeWidgetWin::CenterWindow(const gfx::Size& size) { |
| 671 HWND parent = GetParent(); | 671 HWND parent = GetParent(); |
| 672 if (!IsWindow()) | 672 if (!IsWindow()) |
| 673 parent = ::GetWindow(GetNativeView(), GW_OWNER); | 673 parent = ::GetWindow(GetNativeView(), GW_OWNER); |
| 674 ui::CenterAndSizeWindow(parent, GetNativeView(), size, false); | 674 ui::CenterAndSizeWindow(parent, GetNativeView(), size); |
| 675 } | 675 } |
| 676 | 676 |
| 677 void NativeWidgetWin::GetWindowPlacement( | 677 void NativeWidgetWin::GetWindowPlacement( |
| 678 gfx::Rect* bounds, | 678 gfx::Rect* bounds, |
| 679 ui::WindowShowState* show_state) const { | 679 ui::WindowShowState* show_state) const { |
| 680 WINDOWPLACEMENT wp; | 680 WINDOWPLACEMENT wp; |
| 681 wp.length = sizeof(wp); | 681 wp.length = sizeof(wp); |
| 682 const bool succeeded = !!::GetWindowPlacement(GetNativeView(), &wp); | 682 const bool succeeded = !!::GetWindowPlacement(GetNativeView(), &wp); |
| 683 DCHECK(succeeded); | 683 DCHECK(succeeded); |
| 684 | 684 |
| (...skipping 1923 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2608 return (GetKeyState(VK_LBUTTON) & 0x80) || | 2608 return (GetKeyState(VK_LBUTTON) & 0x80) || |
| 2609 (GetKeyState(VK_RBUTTON) & 0x80) || | 2609 (GetKeyState(VK_RBUTTON) & 0x80) || |
| 2610 (GetKeyState(VK_MBUTTON) & 0x80) || | 2610 (GetKeyState(VK_MBUTTON) & 0x80) || |
| 2611 (GetKeyState(VK_XBUTTON1) & 0x80) || | 2611 (GetKeyState(VK_XBUTTON1) & 0x80) || |
| 2612 (GetKeyState(VK_XBUTTON2) & 0x80); | 2612 (GetKeyState(VK_XBUTTON2) & 0x80); |
| 2613 } | 2613 } |
| 2614 | 2614 |
| 2615 } // namespace internal | 2615 } // namespace internal |
| 2616 | 2616 |
| 2617 } // namespace views | 2617 } // namespace views |
| OLD | NEW |