| 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_view_impl.h" | 5 #include "content/renderer/render_view_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 3473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3484 webview()->settings()->setCompositedScrollingForFramesEnabled( | 3484 webview()->settings()->setCompositedScrollingForFramesEnabled( |
| 3485 ShouldUseCompositedScrollingForFrames(device_scale_factor_)); | 3485 ShouldUseCompositedScrollingForFrames(device_scale_factor_)); |
| 3486 } | 3486 } |
| 3487 if (auto_resize_mode_) | 3487 if (auto_resize_mode_) |
| 3488 AutoResizeCompositor(); | 3488 AutoResizeCompositor(); |
| 3489 | 3489 |
| 3490 if (browser_plugin_manager_.get()) | 3490 if (browser_plugin_manager_.get()) |
| 3491 browser_plugin_manager_->UpdateDeviceScaleFactor(device_scale_factor_); | 3491 browser_plugin_manager_->UpdateDeviceScaleFactor(device_scale_factor_); |
| 3492 } | 3492 } |
| 3493 | 3493 |
| 3494 bool RenderViewImpl::SetDeviceColorProfile( |
| 3495 const std::vector<char>& profile) { |
| 3496 bool changed = RenderWidget::SetDeviceColorProfile(profile); |
| 3497 if (changed && webview()) { |
| 3498 // TODO(noel): notify the webview() of the color profile change so it |
| 3499 // can update and repaint all color profiled page elements. |
| 3500 } |
| 3501 return changed; |
| 3502 } |
| 3503 |
| 3494 ui::TextInputType RenderViewImpl::GetTextInputType() { | 3504 ui::TextInputType RenderViewImpl::GetTextInputType() { |
| 3495 #if defined(ENABLE_PLUGINS) | 3505 #if defined(ENABLE_PLUGINS) |
| 3496 if (focused_pepper_plugin_) | 3506 if (focused_pepper_plugin_) |
| 3497 return focused_pepper_plugin_->text_input_type(); | 3507 return focused_pepper_plugin_->text_input_type(); |
| 3498 #endif | 3508 #endif |
| 3499 return RenderWidget::GetTextInputType(); | 3509 return RenderWidget::GetTextInputType(); |
| 3500 } | 3510 } |
| 3501 | 3511 |
| 3502 void RenderViewImpl::GetSelectionBounds(gfx::Rect* start, gfx::Rect* end) { | 3512 void RenderViewImpl::GetSelectionBounds(gfx::Rect* start, gfx::Rect* end) { |
| 3503 #if defined(ENABLE_PLUGINS) | 3513 #if defined(ENABLE_PLUGINS) |
| (...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3999 params.physical_backing_size = gfx::ToCeiledSize( | 4009 params.physical_backing_size = gfx::ToCeiledSize( |
| 4000 gfx::ScaleSize(size(), params.screen_info.deviceScaleFactor)); | 4010 gfx::ScaleSize(size(), params.screen_info.deviceScaleFactor)); |
| 4001 params.overdraw_bottom_height = 0.f; | 4011 params.overdraw_bottom_height = 0.f; |
| 4002 params.resizer_rect = WebRect(); | 4012 params.resizer_rect = WebRect(); |
| 4003 params.is_fullscreen = is_fullscreen(); | 4013 params.is_fullscreen = is_fullscreen(); |
| 4004 OnResize(params); | 4014 OnResize(params); |
| 4005 } | 4015 } |
| 4006 | 4016 |
| 4007 void RenderViewImpl::SetDeviceColorProfileForTesting( | 4017 void RenderViewImpl::SetDeviceColorProfileForTesting( |
| 4008 const std::vector<char>& color_profile) { | 4018 const std::vector<char>& color_profile) { |
| 4009 // TODO(noel): Add RenderViewImpl::SetDeviceColorProfile(color_profile). | 4019 SetDeviceColorProfile(color_profile); |
| 4010 } | 4020 } |
| 4011 | 4021 |
| 4012 void RenderViewImpl::ForceResizeForTesting(const gfx::Size& new_size) { | 4022 void RenderViewImpl::ForceResizeForTesting(const gfx::Size& new_size) { |
| 4013 gfx::Rect new_position(rootWindowRect().x, | 4023 gfx::Rect new_position(rootWindowRect().x, |
| 4014 rootWindowRect().y, | 4024 rootWindowRect().y, |
| 4015 new_size.width(), | 4025 new_size.width(), |
| 4016 new_size.height()); | 4026 new_size.height()); |
| 4017 ResizeSynchronously(new_position); | 4027 ResizeSynchronously(new_position); |
| 4018 } | 4028 } |
| 4019 | 4029 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4062 std::vector<gfx::Size> sizes; | 4072 std::vector<gfx::Size> sizes; |
| 4063 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); | 4073 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); |
| 4064 if (!url.isEmpty()) | 4074 if (!url.isEmpty()) |
| 4065 urls.push_back( | 4075 urls.push_back( |
| 4066 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); | 4076 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); |
| 4067 } | 4077 } |
| 4068 SendUpdateFaviconURL(urls); | 4078 SendUpdateFaviconURL(urls); |
| 4069 } | 4079 } |
| 4070 | 4080 |
| 4071 } // namespace content | 4081 } // namespace content |
| OLD | NEW |