| 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 1560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1571 #else | 1571 #else |
| 1572 return !!webwidget_; | 1572 return !!webwidget_; |
| 1573 #endif | 1573 #endif |
| 1574 } | 1574 } |
| 1575 | 1575 |
| 1576 void RenderWidget::SetDeviceScaleFactor(float device_scale_factor) { | 1576 void RenderWidget::SetDeviceScaleFactor(float device_scale_factor) { |
| 1577 if (device_scale_factor_ == device_scale_factor) | 1577 if (device_scale_factor_ == device_scale_factor) |
| 1578 return; | 1578 return; |
| 1579 | 1579 |
| 1580 device_scale_factor_ = device_scale_factor; | 1580 device_scale_factor_ = device_scale_factor; |
| 1581 // TODO(wjmaclean): do we need the following line? It only seems to matter for |
| 1582 // InitializeLayerTreeView, which only happens during initialization in which |
| 1583 // case the physical_backing_size is (I think) set via the view params set |
| 1584 // during construction. |
| 1585 physical_backing_size_ = gfx::ScaleToCeiledSize(size_, device_scale_factor_); |
| 1581 | 1586 |
| 1582 OnDeviceScaleFactorChanged(); | 1587 OnDeviceScaleFactorChanged(); |
| 1583 | 1588 |
| 1584 ScheduleComposite(); | 1589 ScheduleComposite(); |
| 1585 } | 1590 } |
| 1586 | 1591 |
| 1587 bool RenderWidget::SetDeviceColorProfile( | 1592 bool RenderWidget::SetDeviceColorProfile( |
| 1588 const std::vector<char>& color_profile) { | 1593 const std::vector<char>& color_profile) { |
| 1589 if (device_color_profile_ == color_profile) | 1594 if (device_color_profile_ == color_profile) |
| 1590 return false; | 1595 return false; |
| (...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2047 void RenderWidget::requestPointerUnlock() { | 2052 void RenderWidget::requestPointerUnlock() { |
| 2048 mouse_lock_dispatcher_->UnlockMouse(webwidget_mouse_lock_target_.get()); | 2053 mouse_lock_dispatcher_->UnlockMouse(webwidget_mouse_lock_target_.get()); |
| 2049 } | 2054 } |
| 2050 | 2055 |
| 2051 bool RenderWidget::isPointerLocked() { | 2056 bool RenderWidget::isPointerLocked() { |
| 2052 return mouse_lock_dispatcher_->IsMouseLockedTo( | 2057 return mouse_lock_dispatcher_->IsMouseLockedTo( |
| 2053 webwidget_mouse_lock_target_.get()); | 2058 webwidget_mouse_lock_target_.get()); |
| 2054 } | 2059 } |
| 2055 | 2060 |
| 2056 } // namespace content | 2061 } // namespace content |
| OLD | NEW |