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

Unified Diff: content/renderer/render_view_impl.cc

Issue 1408393003: Propagate pageScaleFactor to GuestViews (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/render_view_impl.cc
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index ace7f67609514df4088e3a3c6cfba25ee5253a8a..22c3757c89feeaad43b209c3498ab6897763a995 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -1299,6 +1299,7 @@ bool RenderViewImpl::OnMessageReceived(const IPC::Message& message) {
IPC_MESSAGE_HANDLER(ViewMsg_SaveImageAt, OnSaveImageAt)
IPC_MESSAGE_HANDLER(ViewMsg_Find, OnFind)
IPC_MESSAGE_HANDLER(ViewMsg_StopFinding, OnStopFinding)
+ IPC_MESSAGE_HANDLER(ViewMsg_SetPageScale, OnSetPageScale)
IPC_MESSAGE_HANDLER(ViewMsg_ResetPageScale, OnResetPageScale)
wjmaclean 2015/10/19 15:43:28 Ditto, perhaps we can remove this.
Kevin McNee - google account 2015/10/20 15:13:43 Done.
IPC_MESSAGE_HANDLER(ViewMsg_Zoom, OnZoom)
IPC_MESSAGE_HANDLER(ViewMsg_SetZoomLevelForLoadingURL,
@@ -2465,6 +2466,13 @@ void RenderViewImpl::OnFindMatchRects(int current_version) {
}
#endif
+void RenderViewImpl::OnSetPageScale(float page_scale_factor) {
+ // TODO(mcnee): RenderViewImpl deprecated, move to RenderFrameImpl?
+ if (!webview())
+ return;
+ webview()->setPageScaleFactor(page_scale_factor);
+}
+
void RenderViewImpl::OnResetPageScale() {
wjmaclean 2015/10/19 15:43:28 This can probably go away too ...
Kevin McNee - google account 2015/10/20 15:13:43 Done.
if (!webview())
return;
@@ -3376,6 +3384,13 @@ void RenderViewImpl::zoomLevelChanged() {
void RenderViewImpl::pageScaleFactorChanged() {
if (!webview())
return;
+
+ // TODO(mcnee): RenderViewImpl deprecated, move to RenderFrameImpl?
+ Send(new ViewHostMsg_PageScaleFactorChanged(routing_id_,
wjmaclean 2015/10/19 15:43:29 Yeah, but for now this is here, so I guess we modi
Kevin McNee - google account 2015/10/20 15:13:43 Acknowledged.
+ webview()->pageScaleFactor()));
+
+ // TODO(mcnee): now that we send all changes, should we get rid of this msg
+ // and have the browser handle this logic?
wjmaclean 2015/10/19 15:43:28 Yes, remove the extra message.
Kevin McNee - google account 2015/10/20 15:13:43 Done.
bool page_scale_factor_is_one = webview()->pageScaleFactor() == 1;
if (page_scale_factor_is_one == page_scale_factor_is_one_)
return;
« content/public/browser/web_contents_observer.h ('K') | « content/renderer/render_view_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698