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/browser/renderer_host/render_view_host_impl.h" | 5 #include "content/browser/renderer_host/render_view_host_impl.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
309 params->proxy_routing_id = proxy_route_id; | 309 params->proxy_routing_id = proxy_route_id; |
310 params->hidden = GetWidget()->is_hidden(); | 310 params->hidden = GetWidget()->is_hidden(); |
311 params->never_visible = delegate_->IsNeverVisible(); | 311 params->never_visible = delegate_->IsNeverVisible(); |
312 params->window_was_created_with_opener = window_was_created_with_opener; | 312 params->window_was_created_with_opener = window_was_created_with_opener; |
313 params->enable_auto_resize = GetWidget()->auto_resize_enabled(); | 313 params->enable_auto_resize = GetWidget()->auto_resize_enabled(); |
314 params->min_size = GetWidget()->min_size_for_auto_resize(); | 314 params->min_size = GetWidget()->min_size_for_auto_resize(); |
315 params->max_size = GetWidget()->max_size_for_auto_resize(); | 315 params->max_size = GetWidget()->max_size_for_auto_resize(); |
316 params->page_zoom_level = delegate_->GetPendingPageZoomLevel(); | 316 params->page_zoom_level = delegate_->GetPendingPageZoomLevel(); |
317 params->image_decode_color_space = gfx::ICCProfile::FromBestMonitor(); | 317 params->image_decode_color_space = gfx::ICCProfile::FromBestMonitor(); |
318 | 318 |
| 319 // Pretend that HDR displays are sRGB so that we do not have inconsistent |
| 320 // coloring. |
| 321 // TODO(ccameron): Disable this once color correct rasterization is functional |
| 322 // https://crbug.com/701942 |
| 323 if (base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableHDR)) { |
| 324 gfx::ColorSpace::CreateSRGB().GetICCProfile( |
| 325 ¶ms->image_decode_color_space); |
| 326 } |
| 327 |
319 GetWidget()->GetResizeParams(¶ms->initial_size); | 328 GetWidget()->GetResizeParams(¶ms->initial_size); |
320 GetWidget()->SetInitialRenderSizeParams(params->initial_size); | 329 GetWidget()->SetInitialRenderSizeParams(params->initial_size); |
321 | 330 |
322 GetProcess()->GetRendererInterface()->CreateView(std::move(params)); | 331 GetProcess()->GetRendererInterface()->CreateView(std::move(params)); |
323 | 332 |
324 // Let our delegate know that we created a RenderView. | 333 // Let our delegate know that we created a RenderView. |
325 delegate_->RenderViewCreated(this); | 334 delegate_->RenderViewCreated(this); |
326 | 335 |
327 // Since this method can create the main RenderFrame in the renderer process, | 336 // Since this method can create the main RenderFrame in the renderer process, |
328 // set the proper state on its corresponding RenderFrameHost. | 337 // set the proper state on its corresponding RenderFrameHost. |
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
952 } | 961 } |
953 | 962 |
954 void RenderViewHostImpl::ClosePageTimeout() { | 963 void RenderViewHostImpl::ClosePageTimeout() { |
955 if (delegate_->ShouldIgnoreUnresponsiveRenderer()) | 964 if (delegate_->ShouldIgnoreUnresponsiveRenderer()) |
956 return; | 965 return; |
957 | 966 |
958 ClosePageIgnoringUnloadEvents(); | 967 ClosePageIgnoringUnloadEvents(); |
959 } | 968 } |
960 | 969 |
961 } // namespace content | 970 } // namespace content |
OLD | NEW |