| 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 650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 661 | 661 |
| 662 void NativeWidgetWin::ReleaseCapture() { | 662 void NativeWidgetWin::ReleaseCapture() { |
| 663 ::ReleaseCapture(); | 663 ::ReleaseCapture(); |
| 664 } | 664 } |
| 665 | 665 |
| 666 bool NativeWidgetWin::HasCapture() const { | 666 bool NativeWidgetWin::HasCapture() const { |
| 667 return ::GetCapture() == hwnd(); | 667 return ::GetCapture() == hwnd(); |
| 668 } | 668 } |
| 669 | 669 |
| 670 InputMethod* NativeWidgetWin::CreateInputMethod() { | 670 InputMethod* NativeWidgetWin::CreateInputMethod() { |
| 671 #if defined(USE_AURA) | |
| 672 InputMethod* input_method = new InputMethodWin(this); | 671 InputMethod* input_method = new InputMethodWin(this); |
| 673 input_method->Init(GetWidget()); | 672 input_method->Init(GetWidget()); |
| 674 return input_method; | 673 return input_method; |
| 675 #else | |
| 676 return NULL; | |
| 677 #endif | |
| 678 } | 674 } |
| 679 | 675 |
| 680 void NativeWidgetWin::CenterWindow(const gfx::Size& size) { | 676 void NativeWidgetWin::CenterWindow(const gfx::Size& size) { |
| 681 HWND parent = GetParent(); | 677 HWND parent = GetParent(); |
| 682 if (!IsWindow()) | 678 if (!IsWindow()) |
| 683 parent = ::GetWindow(GetNativeView(), GW_OWNER); | 679 parent = ::GetWindow(GetNativeView(), GW_OWNER); |
| 684 ui::CenterAndSizeWindow(parent, GetNativeView(), size); | 680 ui::CenterAndSizeWindow(parent, GetNativeView(), size); |
| 685 } | 681 } |
| 686 | 682 |
| 687 void NativeWidgetWin::GetWindowPlacement( | 683 void NativeWidgetWin::GetWindowPlacement( |
| (...skipping 2038 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2726 // static | 2722 // static |
| 2727 bool NativeWidgetPrivate::IsTouchDown() { | 2723 bool NativeWidgetPrivate::IsTouchDown() { |
| 2728 // This currently isn't necessary because we're not generating touch events on | 2724 // This currently isn't necessary because we're not generating touch events on |
| 2729 // windows. When we do, this will need to be updated. | 2725 // windows. When we do, this will need to be updated. |
| 2730 return false; | 2726 return false; |
| 2731 } | 2727 } |
| 2732 | 2728 |
| 2733 } // namespace internal | 2729 } // namespace internal |
| 2734 | 2730 |
| 2735 } // namespace views | 2731 } // namespace views |
| OLD | NEW |