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

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

Issue 1679393002: Multiple DPI Tracking for ScreenWin (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: CR Feedback EXCEPT rect_util Rename Created 4 years, 10 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 <set> 7 #include <set>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 #include "ui/wm/public/window_types.h" 96 #include "ui/wm/public/window_types.h"
97 97
98 #if defined(OS_WIN) 98 #if defined(OS_WIN)
99 #include "content/browser/accessibility/browser_accessibility_manager_win.h" 99 #include "content/browser/accessibility/browser_accessibility_manager_win.h"
100 #include "content/browser/accessibility/browser_accessibility_win.h" 100 #include "content/browser/accessibility/browser_accessibility_win.h"
101 #include "content/browser/renderer_host/legacy_render_widget_host_win.h" 101 #include "content/browser/renderer_host/legacy_render_widget_host_win.h"
102 #include "content/common/plugin_constants_win.h" 102 #include "content/common/plugin_constants_win.h"
103 #include "ui/base/win/hidden_window.h" 103 #include "ui/base/win/hidden_window.h"
104 #include "ui/gfx/gdi_util.h" 104 #include "ui/gfx/gdi_util.h"
105 #include "ui/gfx/screen_win.h" 105 #include "ui/gfx/screen_win.h"
106 #include "ui/gfx/win/dpi.h"
107 #endif 106 #endif
108 107
109 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) 108 #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
110 #include "content/common/input_messages.h" 109 #include "content/common/input_messages.h"
111 #include "ui/events/linux/text_edit_command_auralinux.h" 110 #include "ui/events/linux/text_edit_command_auralinux.h"
112 #include "ui/events/linux/text_edit_key_bindings_delegate_auralinux.h" 111 #include "ui/events/linux/text_edit_key_bindings_delegate_auralinux.h"
113 #endif 112 #endif
114 113
115 using gfx::RectToSkIRect; 114 using gfx::RectToSkIRect;
116 using gfx::SkIRectToRect; 115 using gfx::SkIRectToRect;
(...skipping 1070 matching lines...) Expand 10 before | Expand all | Expand 10 after
1187 HWND parent = window_->GetHost()->GetAcceleratedWidget(); 1186 HWND parent = window_->GetHost()->GetAcceleratedWidget();
1188 CutoutRectsParams params; 1187 CutoutRectsParams params;
1189 params.widget = this; 1188 params.widget = this;
1190 params.cutout_rects = constrained_rects_; 1189 params.cutout_rects = constrained_rects_;
1191 params.geometry = &plugin_window_moves_; 1190 params.geometry = &plugin_window_moves_;
1192 LPARAM lparam = reinterpret_cast<LPARAM>(&params); 1191 LPARAM lparam = reinterpret_cast<LPARAM>(&params);
1193 EnumChildWindows(parent, SetCutoutRectsCallback, lparam); 1192 EnumChildWindows(parent, SetCutoutRectsCallback, lparam);
1194 } 1193 }
1195 1194
1196 void RenderWidgetHostViewAura::UpdateMouseLockRegion() { 1195 void RenderWidgetHostViewAura::UpdateMouseLockRegion() {
1197 RECT window_rect = 1196 RECT window_rect = gfx::Screen::GetScreen()->DIPToScreenRectInWindow(
1198 gfx::win::DIPToScreenRect(window_->GetBoundsInScreen()).ToRECT(); 1197 window_, window_->GetBoundsInScreen()).ToRECT();
1199 ::ClipCursor(&window_rect); 1198 ::ClipCursor(&window_rect);
1200 } 1199 }
1201 1200
1202 void RenderWidgetHostViewAura::OnLegacyWindowDestroyed() { 1201 void RenderWidgetHostViewAura::OnLegacyWindowDestroyed() {
1203 legacy_render_widget_host_HWND_ = NULL; 1202 legacy_render_widget_host_HWND_ = NULL;
1204 legacy_window_destroyed_ = true; 1203 legacy_window_destroyed_ = true;
1205 } 1204 }
1206 #endif 1205 #endif
1207 1206
1208 void RenderWidgetHostViewAura::OnSwapCompositorFrame( 1207 void RenderWidgetHostViewAura::OnSwapCompositorFrame(
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
1290 // area. Correct for this by subtracting the frame thickness back off. 1289 // area. Correct for this by subtracting the frame thickness back off.
1291 if (::IsZoomed(hwnd)) { 1290 if (::IsZoomed(hwnd)) {
1292 bounds.Inset(GetSystemMetrics(SM_CXSIZEFRAME), 1291 bounds.Inset(GetSystemMetrics(SM_CXSIZEFRAME),
1293 GetSystemMetrics(SM_CYSIZEFRAME)); 1292 GetSystemMetrics(SM_CYSIZEFRAME));
1294 1293
1295 bounds.Inset(GetSystemMetrics(SM_CXPADDEDBORDER), 1294 bounds.Inset(GetSystemMetrics(SM_CXPADDEDBORDER),
1296 GetSystemMetrics(SM_CXPADDEDBORDER)); 1295 GetSystemMetrics(SM_CXPADDEDBORDER));
1297 } 1296 }
1298 } 1297 }
1299 1298
1300 bounds = gfx::win::ScreenToDIPRect(bounds); 1299 bounds = gfx::Screen::GetScreen()->ScreenToDIPRectInWindow(top_level, bounds);
1301 #endif 1300 #endif
1302 1301
1303 return bounds; 1302 return bounds;
1304 } 1303 }
1305 1304
1306 void RenderWidgetHostViewAura::WheelEventAck( 1305 void RenderWidgetHostViewAura::WheelEventAck(
1307 const blink::WebMouseWheelEvent& event, 1306 const blink::WebMouseWheelEvent& event,
1308 InputEventAckState ack_result) { 1307 InputEventAckState ack_result) {
1309 if (overscroll_controller_) { 1308 if (overscroll_controller_) {
1310 overscroll_controller_->ReceivedEventACK( 1309 overscroll_controller_->ReceivedEventACK(
(...skipping 1761 matching lines...) Expand 10 before | Expand all | Expand 10 after
3072 3071
3073 //////////////////////////////////////////////////////////////////////////////// 3072 ////////////////////////////////////////////////////////////////////////////////
3074 // RenderWidgetHostViewBase, public: 3073 // RenderWidgetHostViewBase, public:
3075 3074
3076 // static 3075 // static
3077 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { 3076 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) {
3078 GetScreenInfoForWindow(results, NULL); 3077 GetScreenInfoForWindow(results, NULL);
3079 } 3078 }
3080 3079
3081 } // namespace content 3080 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698