| 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 11 matching lines...) Expand all Loading... |
| 22 #include "ui/base/keycodes/keyboard_code_conversion_win.h" | 22 #include "ui/base/keycodes/keyboard_code_conversion_win.h" |
| 23 #include "ui/base/l10n/l10n_util_win.h" | 23 #include "ui/base/l10n/l10n_util_win.h" |
| 24 #include "ui/base/theme_provider.h" | 24 #include "ui/base/theme_provider.h" |
| 25 #include "ui/base/view_prop.h" | 25 #include "ui/base/view_prop.h" |
| 26 #include "ui/base/win/hwnd_util.h" | 26 #include "ui/base/win/hwnd_util.h" |
| 27 #include "ui/base/win/mouse_wheel_util.h" | 27 #include "ui/base/win/mouse_wheel_util.h" |
| 28 #include "ui/gfx/canvas.h" | 28 #include "ui/gfx/canvas.h" |
| 29 #include "ui/gfx/canvas_paint.h" | 29 #include "ui/gfx/canvas_paint.h" |
| 30 #include "ui/gfx/canvas_skia_paint.h" | 30 #include "ui/gfx/canvas_skia_paint.h" |
| 31 #include "ui/gfx/icon_util.h" | 31 #include "ui/gfx/icon_util.h" |
| 32 #include "ui/gfx/native_theme_win.h" | 32 #include "ui/base/native_theme/native_theme_win.h" |
| 33 #include "ui/gfx/path.h" | 33 #include "ui/gfx/path.h" |
| 34 #include "ui/gfx/screen.h" | 34 #include "ui/gfx/screen.h" |
| 35 #include "ui/views/accessibility/native_view_accessibility_win.h" | 35 #include "ui/views/accessibility/native_view_accessibility_win.h" |
| 36 #include "ui/views/controls/native_control_win.h" | 36 #include "ui/views/controls/native_control_win.h" |
| 37 #include "ui/views/controls/textfield/native_textfield_views.h" | 37 #include "ui/views/controls/textfield/native_textfield_views.h" |
| 38 #include "ui/views/drag_utils.h" | 38 #include "ui/views/drag_utils.h" |
| 39 #include "ui/views/focus/accelerator_handler.h" | 39 #include "ui/views/focus/accelerator_handler.h" |
| 40 #include "ui/views/focus/view_storage.h" | 40 #include "ui/views/focus/view_storage.h" |
| 41 #include "ui/views/ime/input_method_win.h" | 41 #include "ui/views/ime/input_method_win.h" |
| 42 #include "ui/views/views_delegate.h" | 42 #include "ui/views/views_delegate.h" |
| (...skipping 1990 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2033 | 2033 |
| 2034 // If the delegate can't handle it, the system implementation will be called. | 2034 // If the delegate can't handle it, the system implementation will be called. |
| 2035 if (!delegate_->ExecuteCommand(notification_code)) { | 2035 if (!delegate_->ExecuteCommand(notification_code)) { |
| 2036 DefWindowProc(GetNativeView(), WM_SYSCOMMAND, notification_code, | 2036 DefWindowProc(GetNativeView(), WM_SYSCOMMAND, notification_code, |
| 2037 MAKELPARAM(click.x, click.y)); | 2037 MAKELPARAM(click.x, click.y)); |
| 2038 } | 2038 } |
| 2039 } | 2039 } |
| 2040 | 2040 |
| 2041 void NativeWidgetWin::OnThemeChanged() { | 2041 void NativeWidgetWin::OnThemeChanged() { |
| 2042 // Notify NativeThemeWin. | 2042 // Notify NativeThemeWin. |
| 2043 gfx::NativeThemeWin::instance()->CloseHandles(); | 2043 ui::NativeThemeWin::instance()->CloseHandles(); |
| 2044 } | 2044 } |
| 2045 | 2045 |
| 2046 void NativeWidgetWin::OnVScroll(int scroll_type, | 2046 void NativeWidgetWin::OnVScroll(int scroll_type, |
| 2047 short position, | 2047 short position, |
| 2048 HWND scrollbar) { | 2048 HWND scrollbar) { |
| 2049 SetMsgHandled(FALSE); | 2049 SetMsgHandled(FALSE); |
| 2050 } | 2050 } |
| 2051 | 2051 |
| 2052 void NativeWidgetWin::OnWindowPosChanging(WINDOWPOS* window_pos) { | 2052 void NativeWidgetWin::OnWindowPosChanging(WINDOWPOS* window_pos) { |
| 2053 if (ignore_window_pos_changes_) { | 2053 if (ignore_window_pos_changes_) { |
| (...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2667 return (GetKeyState(VK_LBUTTON) & 0x80) || | 2667 return (GetKeyState(VK_LBUTTON) & 0x80) || |
| 2668 (GetKeyState(VK_RBUTTON) & 0x80) || | 2668 (GetKeyState(VK_RBUTTON) & 0x80) || |
| 2669 (GetKeyState(VK_MBUTTON) & 0x80) || | 2669 (GetKeyState(VK_MBUTTON) & 0x80) || |
| 2670 (GetKeyState(VK_XBUTTON1) & 0x80) || | 2670 (GetKeyState(VK_XBUTTON1) & 0x80) || |
| 2671 (GetKeyState(VK_XBUTTON2) & 0x80); | 2671 (GetKeyState(VK_XBUTTON2) & 0x80); |
| 2672 } | 2672 } |
| 2673 | 2673 |
| 2674 } // namespace internal | 2674 } // namespace internal |
| 2675 | 2675 |
| 2676 } // namespace views | 2676 } // namespace views |
| OLD | NEW |