Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(92)

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_aura.cc

Issue 659883002: Enable hidpi on Linux, refactor a bit on Windows to share Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: constants Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 1021 matching lines...) Expand 10 before | Expand all | Expand 10 after
1121 // area. Correct for this by subtracting the frame thickness back off. 1121 // area. Correct for this by subtracting the frame thickness back off.
1122 if (::IsZoomed(hwnd)) { 1122 if (::IsZoomed(hwnd)) {
1123 bounds.Inset(GetSystemMetrics(SM_CXSIZEFRAME), 1123 bounds.Inset(GetSystemMetrics(SM_CXSIZEFRAME),
1124 GetSystemMetrics(SM_CYSIZEFRAME)); 1124 GetSystemMetrics(SM_CYSIZEFRAME));
1125 1125
1126 bounds.Inset(GetSystemMetrics(SM_CXPADDEDBORDER), 1126 bounds.Inset(GetSystemMetrics(SM_CXPADDEDBORDER),
1127 GetSystemMetrics(SM_CXPADDEDBORDER)); 1127 GetSystemMetrics(SM_CXPADDEDBORDER));
1128 } 1128 }
1129 } 1129 }
1130 1130
1131 bounds = gfx::win::ScreenToDIPRect(bounds); 1131 bounds = gfx::ScreenToDIPRect(bounds);
1132 #endif 1132 #endif
1133 1133
1134 return bounds; 1134 return bounds;
1135 } 1135 }
1136 1136
1137 void RenderWidgetHostViewAura::WheelEventAck( 1137 void RenderWidgetHostViewAura::WheelEventAck(
1138 const blink::WebMouseWheelEvent& event, 1138 const blink::WebMouseWheelEvent& event,
1139 InputEventAckState ack_result) { 1139 InputEventAckState ack_result) {
1140 if (overscroll_controller_) { 1140 if (overscroll_controller_) {
1141 overscroll_controller_->ReceivedEventACK( 1141 overscroll_controller_->ReceivedEventACK(
(...skipping 1464 matching lines...) Expand 10 before | Expand all | Expand 10 after
2606 2606
2607 //////////////////////////////////////////////////////////////////////////////// 2607 ////////////////////////////////////////////////////////////////////////////////
2608 // RenderWidgetHostViewBase, public: 2608 // RenderWidgetHostViewBase, public:
2609 2609
2610 // static 2610 // static
2611 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { 2611 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) {
2612 GetScreenInfoForWindow(results, NULL); 2612 GetScreenInfoForWindow(results, NULL);
2613 } 2613 }
2614 2614
2615 } // namespace content 2615 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698