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

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

Issue 11953054: Fix high-DPI on Windows to make use of DIP scaling in WebKit. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Code cleanup. Created 7 years, 11 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_impl.h" 5 #include "content/browser/renderer_host/render_widget_host_impl.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 1320 matching lines...) Expand 10 before | Expand all | Expand 10 after
1331 void RenderWidgetHostImpl::InitializeOverscrollController() { 1331 void RenderWidgetHostImpl::InitializeOverscrollController() {
1332 overscroll_controller_.reset(new OverscrollController(this)); 1332 overscroll_controller_.reset(new OverscrollController(this));
1333 } 1333 }
1334 1334
1335 bool RenderWidgetHostImpl::IsInOverscrollGesture() const { 1335 bool RenderWidgetHostImpl::IsInOverscrollGesture() const {
1336 return overscroll_controller_.get() && 1336 return overscroll_controller_.get() &&
1337 overscroll_controller_->overscroll_mode() != OVERSCROLL_NONE; 1337 overscroll_controller_->overscroll_mode() != OVERSCROLL_NONE;
1338 } 1338 }
1339 1339
1340 void RenderWidgetHostImpl::GetWebScreenInfo(WebKit::WebScreenInfo* result) { 1340 void RenderWidgetHostImpl::GetWebScreenInfo(WebKit::WebScreenInfo* result) {
1341 #if defined(OS_POSIX) || defined(USE_AURA)
1342 if (GetView()) { 1341 if (GetView()) {
1343 static_cast<RenderWidgetHostViewPort*>(GetView())->GetScreenInfo(result); 1342 static_cast<RenderWidgetHostViewPort*>(GetView())->GetScreenInfo(result);
1344 } else { 1343 } else {
1345 RenderWidgetHostViewPort::GetDefaultScreenInfo(result); 1344 RenderWidgetHostViewPort::GetDefaultScreenInfo(result);
1346 } 1345 }
1347 #else
1348 *result = WebKit::WebScreenInfoFactory::screenInfo(
1349 gfx::NativeViewFromId(GetNativeViewId()));
1350 #endif
1351 } 1346 }
1352 1347
1353 void RenderWidgetHostImpl::Destroy() { 1348 void RenderWidgetHostImpl::Destroy() {
1354 NotificationService::current()->Notify( 1349 NotificationService::current()->Notify(
1355 NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED, 1350 NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED,
1356 Source<RenderWidgetHost>(this), 1351 Source<RenderWidgetHost>(this),
1357 NotificationService::NoDetails()); 1352 NotificationService::NoDetails());
1358 1353
1359 // Tell the view to die. 1354 // Tell the view to die.
1360 // Note that in the process of the view shutting down, it can call a ton 1355 // Note that in the process of the view shutting down, it can call a ton
(...skipping 975 matching lines...) Expand 10 before | Expand all | Expand 10 after
2336 return; 2331 return;
2337 2332
2338 OnRenderAutoResized(new_size); 2333 OnRenderAutoResized(new_size);
2339 } 2334 }
2340 2335
2341 void RenderWidgetHostImpl::DetachDelegate() { 2336 void RenderWidgetHostImpl::DetachDelegate() {
2342 delegate_ = NULL; 2337 delegate_ = NULL;
2343 } 2338 }
2344 2339
2345 } // namespace content 2340 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698