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 void RenderWidget::convertWindowToViewport(blink::WebFloatRect* rect) { |
| 1778 if (IsUseZoomForDSFEnabled()) { |
| 1779 rect->x *= device_scale_factor_; |
| 1780 rect->y *= device_scale_factor_; |
| 1781 rect->width *= device_scale_factor_; |
| 1782 rect->height *= device_scale_factor_; |
| 1783 } |
| 1784 } |
| 1785 |
1777 void RenderWidget::OnShowImeIfNeeded() { | 1786 void RenderWidget::OnShowImeIfNeeded() { |
1778 #if defined(OS_ANDROID) || defined(USE_AURA) | 1787 #if defined(OS_ANDROID) || defined(USE_AURA) |
1779 UpdateTextInputState(ShowIme::IF_NEEDED, ChangeSource::FROM_NON_IME); | 1788 UpdateTextInputState(ShowIme::IF_NEEDED, ChangeSource::FROM_NON_IME); |
1780 #endif | 1789 #endif |
1781 | 1790 |
1782 // TODO(rouslan): Fix ChromeOS and Windows 8 behavior of autofill popup with | 1791 // TODO(rouslan): Fix ChromeOS and Windows 8 behavior of autofill popup with |
1783 // virtual keyboard. | 1792 // virtual keyboard. |
1784 #if !defined(OS_ANDROID) | 1793 #if !defined(OS_ANDROID) |
1785 FocusChangeComplete(); | 1794 FocusChangeComplete(); |
1786 #endif | 1795 #endif |
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2271 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) { | 2280 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) { |
2272 video_hole_frames_.AddObserver(frame); | 2281 video_hole_frames_.AddObserver(frame); |
2273 } | 2282 } |
2274 | 2283 |
2275 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) { | 2284 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) { |
2276 video_hole_frames_.RemoveObserver(frame); | 2285 video_hole_frames_.RemoveObserver(frame); |
2277 } | 2286 } |
2278 #endif // defined(VIDEO_HOLE) | 2287 #endif // defined(VIDEO_HOLE) |
2279 | 2288 |
2280 } // namespace content | 2289 } // namespace content |
OLD | NEW |