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 "content/browser/renderer_host/render_widget_host_view_aura.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h" |
6 | 6 |
7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 #include "ui/base/hit_test.h" | 62 #include "ui/base/hit_test.h" |
63 #include "ui/base/ime/input_method.h" | 63 #include "ui/base/ime/input_method.h" |
64 #include "ui/base/ui_base_types.h" | 64 #include "ui/base/ui_base_types.h" |
65 #include "ui/compositor/compositor_vsync_manager.h" | 65 #include "ui/compositor/compositor_vsync_manager.h" |
66 #include "ui/compositor/dip_util.h" | 66 #include "ui/compositor/dip_util.h" |
67 #include "ui/events/event.h" | 67 #include "ui/events/event.h" |
68 #include "ui/events/event_utils.h" | 68 #include "ui/events/event_utils.h" |
69 #include "ui/events/gestures/gesture_recognizer.h" | 69 #include "ui/events/gestures/gesture_recognizer.h" |
70 #include "ui/gfx/canvas.h" | 70 #include "ui/gfx/canvas.h" |
71 #include "ui/gfx/display.h" | 71 #include "ui/gfx/display.h" |
| 72 #include "ui/gfx/dpi.h" |
72 #include "ui/gfx/rect_conversions.h" | 73 #include "ui/gfx/rect_conversions.h" |
73 #include "ui/gfx/screen.h" | 74 #include "ui/gfx/screen.h" |
74 #include "ui/gfx/size_conversions.h" | 75 #include "ui/gfx/size_conversions.h" |
75 #include "ui/gfx/skia_util.h" | 76 #include "ui/gfx/skia_util.h" |
76 #include "ui/wm/public/activation_client.h" | 77 #include "ui/wm/public/activation_client.h" |
77 #include "ui/wm/public/scoped_tooltip_disabler.h" | 78 #include "ui/wm/public/scoped_tooltip_disabler.h" |
78 #include "ui/wm/public/tooltip_client.h" | 79 #include "ui/wm/public/tooltip_client.h" |
79 #include "ui/wm/public/transient_window_client.h" | 80 #include "ui/wm/public/transient_window_client.h" |
80 #include "ui/wm/public/window_types.h" | 81 #include "ui/wm/public/window_types.h" |
81 | 82 |
82 #if defined(OS_WIN) | 83 #if defined(OS_WIN) |
83 #include "content/browser/accessibility/browser_accessibility_manager_win.h" | 84 #include "content/browser/accessibility/browser_accessibility_manager_win.h" |
84 #include "content/browser/accessibility/browser_accessibility_win.h" | 85 #include "content/browser/accessibility/browser_accessibility_win.h" |
85 #include "content/browser/renderer_host/legacy_render_widget_host_win.h" | 86 #include "content/browser/renderer_host/legacy_render_widget_host_win.h" |
86 #include "content/common/plugin_constants_win.h" | 87 #include "content/common/plugin_constants_win.h" |
87 #include "ui/base/win/hidden_window.h" | 88 #include "ui/base/win/hidden_window.h" |
88 #include "ui/gfx/gdi_util.h" | 89 #include "ui/gfx/gdi_util.h" |
89 #include "ui/gfx/win/dpi.h" | |
90 #endif | 90 #endif |
91 | 91 |
92 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) | 92 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
93 #include "content/common/input_messages.h" | 93 #include "content/common/input_messages.h" |
94 #include "ui/events/linux/text_edit_command_auralinux.h" | 94 #include "ui/events/linux/text_edit_command_auralinux.h" |
95 #include "ui/events/linux/text_edit_key_bindings_delegate_auralinux.h" | 95 #include "ui/events/linux/text_edit_key_bindings_delegate_auralinux.h" |
96 #endif | 96 #endif |
97 | 97 |
98 using gfx::RectToSkIRect; | 98 using gfx::RectToSkIRect; |
99 using gfx::SkIRectToRect; | 99 using gfx::SkIRectToRect; |
(...skipping 997 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1097 // area. Correct for this by subtracting the frame thickness back off. | 1097 // area. Correct for this by subtracting the frame thickness back off. |
1098 if (::IsZoomed(hwnd)) { | 1098 if (::IsZoomed(hwnd)) { |
1099 bounds.Inset(GetSystemMetrics(SM_CXSIZEFRAME), | 1099 bounds.Inset(GetSystemMetrics(SM_CXSIZEFRAME), |
1100 GetSystemMetrics(SM_CYSIZEFRAME)); | 1100 GetSystemMetrics(SM_CYSIZEFRAME)); |
1101 | 1101 |
1102 bounds.Inset(GetSystemMetrics(SM_CXPADDEDBORDER), | 1102 bounds.Inset(GetSystemMetrics(SM_CXPADDEDBORDER), |
1103 GetSystemMetrics(SM_CXPADDEDBORDER)); | 1103 GetSystemMetrics(SM_CXPADDEDBORDER)); |
1104 } | 1104 } |
1105 } | 1105 } |
1106 | 1106 |
1107 bounds = gfx::win::ScreenToDIPRect(bounds); | 1107 bounds = gfx::ScreenToDIPRect(bounds); |
1108 #endif | 1108 #endif |
1109 | 1109 |
1110 return bounds; | 1110 return bounds; |
1111 } | 1111 } |
1112 | 1112 |
1113 void RenderWidgetHostViewAura::WheelEventAck( | 1113 void RenderWidgetHostViewAura::WheelEventAck( |
1114 const blink::WebMouseWheelEvent& event, | 1114 const blink::WebMouseWheelEvent& event, |
1115 InputEventAckState ack_result) { | 1115 InputEventAckState ack_result) { |
1116 if (overscroll_controller_) { | 1116 if (overscroll_controller_) { |
1117 overscroll_controller_->ReceivedEventACK( | 1117 overscroll_controller_->ReceivedEventACK( |
(...skipping 1461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2579 | 2579 |
2580 //////////////////////////////////////////////////////////////////////////////// | 2580 //////////////////////////////////////////////////////////////////////////////// |
2581 // RenderWidgetHostViewBase, public: | 2581 // RenderWidgetHostViewBase, public: |
2582 | 2582 |
2583 // static | 2583 // static |
2584 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { | 2584 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { |
2585 GetScreenInfoForWindow(results, NULL); | 2585 GetScreenInfoForWindow(results, NULL); |
2586 } | 2586 } |
2587 | 2587 |
2588 } // namespace content | 2588 } // namespace content |
OLD | NEW |