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

Side by Side Diff: third_party/WebKit/Source/web/ChromeClientImpl.cpp

Issue 1978763004: Drag image should always use the real device scale factor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 574
575 float ChromeClientImpl::windowToViewportScalar(const float scalarValue) const 575 float ChromeClientImpl::windowToViewportScalar(const float scalarValue) const
576 { 576 {
577 if (!m_webView->client()) 577 if (!m_webView->client())
578 return scalarValue; 578 return scalarValue;
579 WebFloatRect viewportRect(0, 0, scalarValue, 0); 579 WebFloatRect viewportRect(0, 0, scalarValue, 0);
580 m_webView->client()->convertWindowToViewport(&viewportRect); 580 m_webView->client()->convertWindowToViewport(&viewportRect);
581 return viewportRect.width; 581 return viewportRect.width;
582 } 582 }
583 583
584 float ChromeClientImpl::nonEmulatedDeviceScaleFactor() const
585 {
586 return m_webView->client() ? m_webView->client()->nonEmulatedDeviceScaleFact or() : 1.f;
587 }
588
584 WebScreenInfo ChromeClientImpl::screenInfo() const 589 WebScreenInfo ChromeClientImpl::screenInfo() const
585 { 590 {
586 return m_webView->client() ? m_webView->client()->screenInfo() : WebScreenIn fo(); 591 return m_webView->client() ? m_webView->client()->screenInfo() : WebScreenIn fo();
587 } 592 }
588 593
589 void ChromeClientImpl::contentsSizeChanged(LocalFrame* frame, const IntSize& siz e) const 594 void ChromeClientImpl::contentsSizeChanged(LocalFrame* frame, const IntSize& siz e) const
590 { 595 {
591 m_webView->didChangeContentsSize(); 596 m_webView->didChangeContentsSize();
592 597
593 WebLocalFrameImpl* webframe = WebLocalFrameImpl::fromFrame(frame); 598 WebLocalFrameImpl* webframe = WebLocalFrameImpl::fromFrame(frame);
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
1108 { 1113 {
1109 return adoptPtr(m_webView->scheduler()->createFrameScheduler(blameContext).r elease()); 1114 return adoptPtr(m_webView->scheduler()->createFrameScheduler(blameContext).r elease());
1110 } 1115 }
1111 1116
1112 double ChromeClientImpl::lastFrameTimeMonotonic() const 1117 double ChromeClientImpl::lastFrameTimeMonotonic() const
1113 { 1118 {
1114 return m_webView->lastFrameTimeMonotonic(); 1119 return m_webView->lastFrameTimeMonotonic();
1115 } 1120 }
1116 1121
1117 } // namespace blink 1122 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/ChromeClientImpl.h ('k') | third_party/WebKit/public/web/WebViewClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698