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

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

Issue 11066130: Fix for out-of-sync scale factor issue (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | Annotate | Revision Log
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 1083 matching lines...) Expand 10 before | Expand all | Expand 10 after
1094 keyboard_listeners_.remove(listener); 1094 keyboard_listeners_.remove(listener);
1095 } 1095 }
1096 1096
1097 void RenderWidgetHostImpl::NotifyScreenInfoChanged() { 1097 void RenderWidgetHostImpl::NotifyScreenInfoChanged() {
1098 WebKit::WebScreenInfo screen_info; 1098 WebKit::WebScreenInfo screen_info;
1099 GetWebScreenInfo(&screen_info); 1099 GetWebScreenInfo(&screen_info);
1100 Send(new ViewMsg_ScreenInfoChanged(GetRoutingID(), screen_info)); 1100 Send(new ViewMsg_ScreenInfoChanged(GetRoutingID(), screen_info));
1101 } 1101 }
1102 1102
1103 void RenderWidgetHostImpl::SetDeviceScaleFactor(float scale) { 1103 void RenderWidgetHostImpl::SetDeviceScaleFactor(float scale) {
1104 // Send secreen info as well because JavaScript API |window.open|
1105 // uses screen info to determine the scale factor (crbug.com/155201).
1106 // TODO(oshima|thakis): Consolidate SetDeviceScaleFactor and
1107 // ScreenInfoChanged.
1108 NotifyScreenInfoChanged();
1104 Send(new ViewMsg_SetDeviceScaleFactor(GetRoutingID(), scale)); 1109 Send(new ViewMsg_SetDeviceScaleFactor(GetRoutingID(), scale));
1105 } 1110 }
1106 1111
1107 void RenderWidgetHostImpl::UpdateVSyncParameters(base::TimeTicks timebase, 1112 void RenderWidgetHostImpl::UpdateVSyncParameters(base::TimeTicks timebase,
1108 base::TimeDelta interval) { 1113 base::TimeDelta interval) {
1109 Send(new ViewMsg_UpdateVSyncParameters(GetRoutingID(), timebase, interval)); 1114 Send(new ViewMsg_UpdateVSyncParameters(GetRoutingID(), timebase, interval));
1110 } 1115 }
1111 1116
1112 void RenderWidgetHostImpl::RendererExited(base::TerminationStatus status, 1117 void RenderWidgetHostImpl::RendererExited(base::TerminationStatus status,
1113 int exit_code) { 1118 int exit_code) {
(...skipping 1007 matching lines...) Expand 10 before | Expand all | Expand 10 after
2121 return; 2126 return;
2122 2127
2123 OnRenderAutoResized(new_size); 2128 OnRenderAutoResized(new_size);
2124 } 2129 }
2125 2130
2126 void RenderWidgetHostImpl::DetachDelegate() { 2131 void RenderWidgetHostImpl::DetachDelegate() {
2127 delegate_ = NULL; 2132 delegate_ = NULL;
2128 } 2133 }
2129 2134
2130 } // namespace content 2135 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698