| 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 <set> | 7 #include <set> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 1745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1756 void RenderWidgetHostViewAura::OnPaint(const ui::PaintContext& context) { | 1756 void RenderWidgetHostViewAura::OnPaint(const ui::PaintContext& context) { |
| 1757 NOTREACHED(); | 1757 NOTREACHED(); |
| 1758 } | 1758 } |
| 1759 | 1759 |
| 1760 void RenderWidgetHostViewAura::OnDeviceScaleFactorChanged( | 1760 void RenderWidgetHostViewAura::OnDeviceScaleFactorChanged( |
| 1761 float device_scale_factor) { | 1761 float device_scale_factor) { |
| 1762 // TODO(wjmaclean): can host_ ever be null? | 1762 // TODO(wjmaclean): can host_ ever be null? |
| 1763 if (!host_ || !window_->GetRootWindow()) | 1763 if (!host_ || !window_->GetRootWindow()) |
| 1764 return; | 1764 return; |
| 1765 | 1765 |
| 1766 UpdateScreenInfo(window_); | 1766 RenderWidgetHostImpl* host = |
| 1767 RenderWidgetHostImpl::From(GetRenderWidgetHost()); |
| 1768 if (host && host->delegate()) |
| 1769 host->delegate()->UpdateDeviceScaleFactor(device_scale_factor); |
| 1767 | 1770 |
| 1768 device_scale_factor_ = device_scale_factor; | 1771 device_scale_factor_ = device_scale_factor; |
| 1769 const display::Display display = | 1772 const display::Display display = |
| 1770 display::Screen::GetScreen()->GetDisplayNearestWindow(window_); | 1773 display::Screen::GetScreen()->GetDisplayNearestWindow(window_); |
| 1771 DCHECK_EQ(device_scale_factor, display.device_scale_factor()); | 1774 DCHECK_EQ(device_scale_factor, display.device_scale_factor()); |
| 1772 current_cursor_.SetDisplayInfo(display); | 1775 current_cursor_.SetDisplayInfo(display); |
| 1773 SnapToPhysicalPixelBoundary(); | 1776 SnapToPhysicalPixelBoundary(); |
| 1774 } | 1777 } |
| 1775 | 1778 |
| 1776 void RenderWidgetHostViewAura::OnWindowDestroying(aura::Window* window) { | 1779 void RenderWidgetHostViewAura::OnWindowDestroying(aura::Window* window) { |
| (...skipping 1260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3037 | 3040 |
| 3038 //////////////////////////////////////////////////////////////////////////////// | 3041 //////////////////////////////////////////////////////////////////////////////// |
| 3039 // RenderWidgetHostViewBase, public: | 3042 // RenderWidgetHostViewBase, public: |
| 3040 | 3043 |
| 3041 // static | 3044 // static |
| 3042 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { | 3045 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { |
| 3043 GetScreenInfoForWindow(results, NULL); | 3046 GetScreenInfoForWindow(results, NULL); |
| 3044 } | 3047 } |
| 3045 | 3048 |
| 3046 } // namespace content | 3049 } // namespace content |
| OLD | NEW |