| 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/renderer/render_widget.h" | 5 #include "content/renderer/render_widget.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 1756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1767 // anchor element can be placed at half pixel. | 1767 // anchor element can be placed at half pixel. |
| 1768 gfx::Rect window_rect = | 1768 gfx::Rect window_rect = |
| 1769 gfx::ScaleToEnclosedRect(gfx::Rect(*rect), reverse); | 1769 gfx::ScaleToEnclosedRect(gfx::Rect(*rect), reverse); |
| 1770 rect->x = window_rect.x(); | 1770 rect->x = window_rect.x(); |
| 1771 rect->y = window_rect.y(); | 1771 rect->y = window_rect.y(); |
| 1772 rect->width = window_rect.width(); | 1772 rect->width = window_rect.width(); |
| 1773 rect->height = window_rect.height(); | 1773 rect->height = window_rect.height(); |
| 1774 } | 1774 } |
| 1775 } | 1775 } |
| 1776 | 1776 |
| 1777 float RenderWidget::convertWindowToViewport(float scalar) { |
| 1778 return IsUseZoomForDSFEnabled() ? scalar * device_scale_factor_ : scalar; |
| 1779 } |
| 1780 |
| 1777 void RenderWidget::OnShowImeIfNeeded() { | 1781 void RenderWidget::OnShowImeIfNeeded() { |
| 1778 #if defined(OS_ANDROID) || defined(USE_AURA) | 1782 #if defined(OS_ANDROID) || defined(USE_AURA) |
| 1779 UpdateTextInputState(ShowIme::IF_NEEDED, ChangeSource::FROM_NON_IME); | 1783 UpdateTextInputState(ShowIme::IF_NEEDED, ChangeSource::FROM_NON_IME); |
| 1780 #endif | 1784 #endif |
| 1781 | 1785 |
| 1782 // TODO(rouslan): Fix ChromeOS and Windows 8 behavior of autofill popup with | 1786 // TODO(rouslan): Fix ChromeOS and Windows 8 behavior of autofill popup with |
| 1783 // virtual keyboard. | 1787 // virtual keyboard. |
| 1784 #if !defined(OS_ANDROID) | 1788 #if !defined(OS_ANDROID) |
| 1785 FocusChangeComplete(); | 1789 FocusChangeComplete(); |
| 1786 #endif | 1790 #endif |
| (...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2271 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) { | 2275 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) { |
| 2272 video_hole_frames_.AddObserver(frame); | 2276 video_hole_frames_.AddObserver(frame); |
| 2273 } | 2277 } |
| 2274 | 2278 |
| 2275 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) { | 2279 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) { |
| 2276 video_hole_frames_.RemoveObserver(frame); | 2280 video_hole_frames_.RemoveObserver(frame); |
| 2277 } | 2281 } |
| 2278 #endif // defined(VIDEO_HOLE) | 2282 #endif // defined(VIDEO_HOLE) |
| 2279 | 2283 |
| 2280 } // namespace content | 2284 } // namespace content |
| OLD | NEW |