| 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 1749 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1760 } | 1760 } |
| 1761 | 1761 |
| 1762 UpdateCompositionInfo(false /* not an immediate request */); | 1762 UpdateCompositionInfo(false /* not an immediate request */); |
| 1763 } | 1763 } |
| 1764 | 1764 |
| 1765 void RenderWidget::SetDeviceColorProfileForTesting( | 1765 void RenderWidget::SetDeviceColorProfileForTesting( |
| 1766 const std::vector<char>& color_profile) { | 1766 const std::vector<char>& color_profile) { |
| 1767 SetDeviceColorProfile(color_profile); | 1767 SetDeviceColorProfile(color_profile); |
| 1768 } | 1768 } |
| 1769 | 1769 |
| 1770 void RenderWidget::ResetDeviceColorProfileForTesting() { | |
| 1771 std::vector<char> color_profile; | |
| 1772 color_profile.push_back('0'); | |
| 1773 SetDeviceColorProfile(color_profile); | |
| 1774 } | |
| 1775 | |
| 1776 void RenderWidget::DidAutoResize(const gfx::Size& new_size) { | 1770 void RenderWidget::DidAutoResize(const gfx::Size& new_size) { |
| 1777 WebRect new_size_in_window(0, 0, new_size.width(), new_size.height()); | 1771 WebRect new_size_in_window(0, 0, new_size.width(), new_size.height()); |
| 1778 convertViewportToWindow(&new_size_in_window); | 1772 convertViewportToWindow(&new_size_in_window); |
| 1779 if (size_.width() != new_size_in_window.width || | 1773 if (size_.width() != new_size_in_window.width || |
| 1780 size_.height() != new_size_in_window.height) { | 1774 size_.height() != new_size_in_window.height) { |
| 1781 size_ = gfx::Size(new_size_in_window.width, new_size_in_window.height); | 1775 size_ = gfx::Size(new_size_in_window.width, new_size_in_window.height); |
| 1782 | 1776 |
| 1783 if (resizing_mode_selector_->is_synchronous_mode()) { | 1777 if (resizing_mode_selector_->is_synchronous_mode()) { |
| 1784 gfx::Rect new_pos(RootWindowRect().x(), RootWindowRect().y(), | 1778 gfx::Rect new_pos(RootWindowRect().x(), RootWindowRect().y(), |
| 1785 size_.width(), size_.height()); | 1779 size_.width(), size_.height()); |
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2065 void RenderWidget::requestPointerUnlock() { | 2059 void RenderWidget::requestPointerUnlock() { |
| 2066 mouse_lock_dispatcher_->UnlockMouse(webwidget_mouse_lock_target_.get()); | 2060 mouse_lock_dispatcher_->UnlockMouse(webwidget_mouse_lock_target_.get()); |
| 2067 } | 2061 } |
| 2068 | 2062 |
| 2069 bool RenderWidget::isPointerLocked() { | 2063 bool RenderWidget::isPointerLocked() { |
| 2070 return mouse_lock_dispatcher_->IsMouseLockedTo( | 2064 return mouse_lock_dispatcher_->IsMouseLockedTo( |
| 2071 webwidget_mouse_lock_target_.get()); | 2065 webwidget_mouse_lock_target_.get()); |
| 2072 } | 2066 } |
| 2073 | 2067 |
| 2074 } // namespace content | 2068 } // namespace content |
| OLD | NEW |