OLD | NEW |
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 1091 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1102 keyboard_listeners_.remove(listener); | 1102 keyboard_listeners_.remove(listener); |
1103 } | 1103 } |
1104 | 1104 |
1105 void RenderWidgetHostImpl::NotifyScreenInfoChanged() { | 1105 void RenderWidgetHostImpl::NotifyScreenInfoChanged() { |
1106 WebKit::WebScreenInfo screen_info; | 1106 WebKit::WebScreenInfo screen_info; |
1107 GetWebScreenInfo(&screen_info); | 1107 GetWebScreenInfo(&screen_info); |
1108 Send(new ViewMsg_ScreenInfoChanged(GetRoutingID(), screen_info)); | 1108 Send(new ViewMsg_ScreenInfoChanged(GetRoutingID(), screen_info)); |
1109 } | 1109 } |
1110 | 1110 |
1111 void RenderWidgetHostImpl::SetDeviceScaleFactor(float scale) { | 1111 void RenderWidgetHostImpl::SetDeviceScaleFactor(float scale) { |
| 1112 #if defined(USE_AURA) |
| 1113 // Send secreen info as well because JavaScript API |window.open| |
| 1114 // uses screen info to determine the scale factor (crbug.com/155201). |
| 1115 // TODO(oshima|thakis): Consolidate SetDeviceScaleFactor and |
| 1116 // ScreenInfoChanged. crbug.com/155213. |
| 1117 NotifyScreenInfoChanged(); |
| 1118 #endif |
1112 Send(new ViewMsg_SetDeviceScaleFactor(GetRoutingID(), scale)); | 1119 Send(new ViewMsg_SetDeviceScaleFactor(GetRoutingID(), scale)); |
1113 } | 1120 } |
1114 | 1121 |
1115 void RenderWidgetHostImpl::UpdateVSyncParameters(base::TimeTicks timebase, | 1122 void RenderWidgetHostImpl::UpdateVSyncParameters(base::TimeTicks timebase, |
1116 base::TimeDelta interval) { | 1123 base::TimeDelta interval) { |
1117 Send(new ViewMsg_UpdateVSyncParameters(GetRoutingID(), timebase, interval)); | 1124 Send(new ViewMsg_UpdateVSyncParameters(GetRoutingID(), timebase, interval)); |
1118 } | 1125 } |
1119 | 1126 |
1120 void RenderWidgetHostImpl::RendererExited(base::TerminationStatus status, | 1127 void RenderWidgetHostImpl::RendererExited(base::TerminationStatus status, |
1121 int exit_code) { | 1128 int exit_code) { |
(...skipping 1036 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2158 return; | 2165 return; |
2159 | 2166 |
2160 OnRenderAutoResized(new_size); | 2167 OnRenderAutoResized(new_size); |
2161 } | 2168 } |
2162 | 2169 |
2163 void RenderWidgetHostImpl::DetachDelegate() { | 2170 void RenderWidgetHostImpl::DetachDelegate() { |
2164 delegate_ = NULL; | 2171 delegate_ = NULL; |
2165 } | 2172 } |
2166 | 2173 |
2167 } // namespace content | 2174 } // namespace content |
OLD | NEW |