| 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 1017 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1117 // area. Correct for this by subtracting the frame thickness back off. | 1117 // area. Correct for this by subtracting the frame thickness back off. |
| 1118 if (::IsZoomed(hwnd)) { | 1118 if (::IsZoomed(hwnd)) { |
| 1119 bounds.Inset(GetSystemMetrics(SM_CXSIZEFRAME), | 1119 bounds.Inset(GetSystemMetrics(SM_CXSIZEFRAME), |
| 1120 GetSystemMetrics(SM_CYSIZEFRAME)); | 1120 GetSystemMetrics(SM_CYSIZEFRAME)); |
| 1121 | 1121 |
| 1122 bounds.Inset(GetSystemMetrics(SM_CXPADDEDBORDER), | 1122 bounds.Inset(GetSystemMetrics(SM_CXPADDEDBORDER), |
| 1123 GetSystemMetrics(SM_CXPADDEDBORDER)); | 1123 GetSystemMetrics(SM_CXPADDEDBORDER)); |
| 1124 } | 1124 } |
| 1125 } | 1125 } |
| 1126 | 1126 |
| 1127 bounds = gfx::win::ScreenToDIPRect(bounds); | 1127 bounds = gfx::ScreenToDIPRect(bounds); |
| 1128 #endif | 1128 #endif |
| 1129 | 1129 |
| 1130 return bounds; | 1130 return bounds; |
| 1131 } | 1131 } |
| 1132 | 1132 |
| 1133 void RenderWidgetHostViewAura::WheelEventAck( | 1133 void RenderWidgetHostViewAura::WheelEventAck( |
| 1134 const blink::WebMouseWheelEvent& event, | 1134 const blink::WebMouseWheelEvent& event, |
| 1135 InputEventAckState ack_result) { | 1135 InputEventAckState ack_result) { |
| 1136 if (overscroll_controller_) { | 1136 if (overscroll_controller_) { |
| 1137 overscroll_controller_->ReceivedEventACK( | 1137 overscroll_controller_->ReceivedEventACK( |
| (...skipping 1461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2599 | 2599 |
| 2600 //////////////////////////////////////////////////////////////////////////////// | 2600 //////////////////////////////////////////////////////////////////////////////// |
| 2601 // RenderWidgetHostViewBase, public: | 2601 // RenderWidgetHostViewBase, public: |
| 2602 | 2602 |
| 2603 // static | 2603 // static |
| 2604 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { | 2604 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { |
| 2605 GetScreenInfoForWindow(results, NULL); | 2605 GetScreenInfoForWindow(results, NULL); |
| 2606 } | 2606 } |
| 2607 | 2607 |
| 2608 } // namespace content | 2608 } // namespace content |
| OLD | NEW |