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 3663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3674 bool RenderViewImpl::SetDeviceColorProfile( | 3674 bool RenderViewImpl::SetDeviceColorProfile( |
3675 const std::vector<char>& profile) { | 3675 const std::vector<char>& profile) { |
3676 bool changed = RenderWidget::SetDeviceColorProfile(profile); | 3676 bool changed = RenderWidget::SetDeviceColorProfile(profile); |
3677 if (changed && webview()) { | 3677 if (changed && webview()) { |
3678 // TODO(noel): notify the webview() of the color profile change so it | 3678 // TODO(noel): notify the webview() of the color profile change so it |
3679 // can update and repaint all color profiled page elements. | 3679 // can update and repaint all color profiled page elements. |
3680 } | 3680 } |
3681 return changed; | 3681 return changed; |
3682 } | 3682 } |
3683 | 3683 |
| 3684 void RenderViewImpl::ResetDeviceColorProfileForTesting() { |
| 3685 RenderWidget::ResetDeviceColorProfileForTesting(); |
| 3686 if (webview()) |
| 3687 webview()->resetDeviceColorProfile(); |
| 3688 } |
| 3689 |
3684 ui::TextInputType RenderViewImpl::GetTextInputType() { | 3690 ui::TextInputType RenderViewImpl::GetTextInputType() { |
3685 #if defined(ENABLE_PLUGINS) | 3691 #if defined(ENABLE_PLUGINS) |
3686 if (focused_pepper_plugin_) | 3692 if (focused_pepper_plugin_) |
3687 return focused_pepper_plugin_->text_input_type(); | 3693 return focused_pepper_plugin_->text_input_type(); |
3688 #endif | 3694 #endif |
3689 return RenderWidget::GetTextInputType(); | 3695 return RenderWidget::GetTextInputType(); |
3690 } | 3696 } |
3691 | 3697 |
3692 void RenderViewImpl::GetSelectionBounds(gfx::Rect* start, gfx::Rect* end) { | 3698 void RenderViewImpl::GetSelectionBounds(gfx::Rect* start, gfx::Rect* end) { |
3693 #if defined(ENABLE_PLUGINS) | 3699 #if defined(ENABLE_PLUGINS) |
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4200 std::vector<gfx::Size> sizes; | 4206 std::vector<gfx::Size> sizes; |
4201 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); | 4207 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); |
4202 if (!url.isEmpty()) | 4208 if (!url.isEmpty()) |
4203 urls.push_back( | 4209 urls.push_back( |
4204 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); | 4210 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); |
4205 } | 4211 } |
4206 SendUpdateFaviconURL(urls); | 4212 SendUpdateFaviconURL(urls); |
4207 } | 4213 } |
4208 | 4214 |
4209 } // namespace content | 4215 } // namespace content |
OLD | NEW |