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 <memory> | 7 #include <memory> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
(...skipping 1894 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1905 void RenderWidget::OnSetDeviceScaleFactor(float device_scale_factor) { | 1905 void RenderWidget::OnSetDeviceScaleFactor(float device_scale_factor) { |
1906 if (device_scale_factor_ == device_scale_factor) | 1906 if (device_scale_factor_ == device_scale_factor) |
1907 return; | 1907 return; |
1908 | 1908 |
1909 device_scale_factor_ = device_scale_factor; | 1909 device_scale_factor_ = device_scale_factor; |
1910 OnDeviceScaleFactorChanged(); | 1910 OnDeviceScaleFactorChanged(); |
1911 physical_backing_size_ = gfx::ScaleToCeiledSize(size_, device_scale_factor_); | 1911 physical_backing_size_ = gfx::ScaleToCeiledSize(size_, device_scale_factor_); |
1912 } | 1912 } |
1913 | 1913 |
1914 void RenderWidget::OnOrientationChange() { | 1914 void RenderWidget::OnOrientationChange() { |
| 1915 WebWidget* web_widget = GetWebWidget(); |
| 1916 if (web_widget && web_widget->IsWebFrameWidget()) { |
| 1917 WebFrameWidget* web_frame_widget = static_cast<WebFrameWidget*>(web_widget); |
| 1918 web_frame_widget->LocalRoot()->SendOrientationChangeEvent(); |
| 1919 } |
1915 } | 1920 } |
1916 | 1921 |
1917 void RenderWidget::SetHidden(bool hidden) { | 1922 void RenderWidget::SetHidden(bool hidden) { |
1918 if (is_hidden_ == hidden) | 1923 if (is_hidden_ == hidden) |
1919 return; | 1924 return; |
1920 | 1925 |
1921 // The status has changed. Tell the RenderThread about it and ensure | 1926 // The status has changed. Tell the RenderThread about it and ensure |
1922 // throttled acks are released in case frame production ceases. | 1927 // throttled acks are released in case frame production ceases. |
1923 is_hidden_ = hidden; | 1928 is_hidden_ = hidden; |
1924 | 1929 |
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2332 // browser side (https://crbug.com/669219). | 2337 // browser side (https://crbug.com/669219). |
2333 // If there is no WebFrameWidget, then there will be no | 2338 // If there is no WebFrameWidget, then there will be no |
2334 // InputMethodControllers for a WebLocalFrame. | 2339 // InputMethodControllers for a WebLocalFrame. |
2335 return nullptr; | 2340 return nullptr; |
2336 } | 2341 } |
2337 return static_cast<blink::WebFrameWidget*>(GetWebWidget()) | 2342 return static_cast<blink::WebFrameWidget*>(GetWebWidget()) |
2338 ->GetActiveWebInputMethodController(); | 2343 ->GetActiveWebInputMethodController(); |
2339 } | 2344 } |
2340 | 2345 |
2341 } // namespace content | 2346 } // namespace content |
OLD | NEW |