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_view_aura.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
(...skipping 1273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1284 void RenderWidgetHostViewAura::OnDeviceScaleFactorChanged( | 1284 void RenderWidgetHostViewAura::OnDeviceScaleFactorChanged( |
1285 float device_scale_factor) { | 1285 float device_scale_factor) { |
1286 if (!host_) | 1286 if (!host_) |
1287 return; | 1287 return; |
1288 | 1288 |
1289 BackingStoreAura* backing_store = static_cast<BackingStoreAura*>( | 1289 BackingStoreAura* backing_store = static_cast<BackingStoreAura*>( |
1290 host_->GetBackingStore(false)); | 1290 host_->GetBackingStore(false)); |
1291 if (backing_store) // NULL in hardware path. | 1291 if (backing_store) // NULL in hardware path. |
1292 backing_store->ScaleFactorChanged(device_scale_factor); | 1292 backing_store->ScaleFactorChanged(device_scale_factor); |
1293 | 1293 |
| 1294 ImageTransportFactory* factory = ImageTransportFactory::GetInstance(); |
| 1295 factory->SetDeviceScaleFactor(device_scale_factor); |
1294 host_->SetDeviceScaleFactor(device_scale_factor); | 1296 host_->SetDeviceScaleFactor(device_scale_factor); |
1295 current_cursor_.SetScaleFactor(device_scale_factor); | 1297 current_cursor_.SetScaleFactor(device_scale_factor); |
1296 } | 1298 } |
1297 | 1299 |
1298 void RenderWidgetHostViewAura::OnWindowDestroying() { | 1300 void RenderWidgetHostViewAura::OnWindowDestroying() { |
1299 #if defined(OS_WIN) | 1301 #if defined(OS_WIN) |
1300 if (window_->GetRootWindow()) { | 1302 if (window_->GetRootWindow()) { |
1301 HWND parent = window_->GetRootWindow()->GetAcceleratedWidget(); | 1303 HWND parent = window_->GetRootWindow()->GetAcceleratedWidget(); |
1302 DetachPluginsHelper(parent); | 1304 DetachPluginsHelper(parent); |
1303 } | 1305 } |
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1791 RenderWidgetHost* widget) { | 1793 RenderWidgetHost* widget) { |
1792 return new RenderWidgetHostViewAura(widget); | 1794 return new RenderWidgetHostViewAura(widget); |
1793 } | 1795 } |
1794 | 1796 |
1795 // static | 1797 // static |
1796 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) { | 1798 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) { |
1797 GetScreenInfoForWindow(results, NULL); | 1799 GetScreenInfoForWindow(results, NULL); |
1798 } | 1800 } |
1799 | 1801 |
1800 } // namespace content | 1802 } // namespace content |
OLD | NEW |