Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1332)

Side by Side Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 1796293003: Image decode color: Push color profile from browser to renderer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix windows tests Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 #include "content/public/common/url_utils.h" 77 #include "content/public/common/url_utils.h"
78 #include "net/base/filename_util.h" 78 #include "net/base/filename_util.h"
79 #include "net/base/url_util.h" 79 #include "net/base/url_util.h"
80 #include "net/url_request/url_request_context_getter.h" 80 #include "net/url_request/url_request_context_getter.h"
81 #include "storage/browser/fileapi/isolated_context.h" 81 #include "storage/browser/fileapi/isolated_context.h"
82 #include "third_party/skia/include/core/SkBitmap.h" 82 #include "third_party/skia/include/core/SkBitmap.h"
83 #include "ui/base/touch/touch_device.h" 83 #include "ui/base/touch/touch_device.h"
84 #include "ui/base/touch/touch_enabled.h" 84 #include "ui/base/touch/touch_enabled.h"
85 #include "ui/base/ui_base_switches.h" 85 #include "ui/base/ui_base_switches.h"
86 #include "ui/gfx/animation/animation.h" 86 #include "ui/gfx/animation/animation.h"
87 #include "ui/gfx/color_profile.h"
87 #include "ui/gfx/image/image_skia.h" 88 #include "ui/gfx/image/image_skia.h"
88 #include "ui/gfx/native_widget_types.h" 89 #include "ui/gfx/native_widget_types.h"
89 #include "ui/native_theme/native_theme_switches.h" 90 #include "ui/native_theme/native_theme_switches.h"
90 #include "url/url_constants.h" 91 #include "url/url_constants.h"
91 92
92 #if defined(OS_WIN) 93 #if defined(OS_WIN)
93 #include "base/win/win_util.h" 94 #include "base/win/win_util.h"
94 #include "ui/gfx/platform_font_win.h" 95 #include "ui/gfx/platform_font_win.h"
95 #include "ui/gfx/win/dpi.h" 96 #include "ui/gfx/win/dpi.h"
96 #endif 97 #endif
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 params.swapped_out = !is_active_; 332 params.swapped_out = !is_active_;
332 params.replicated_frame_state = replicated_frame_state; 333 params.replicated_frame_state = replicated_frame_state;
333 params.proxy_routing_id = proxy_route_id; 334 params.proxy_routing_id = proxy_route_id;
334 params.hidden = GetWidget()->is_hidden(); 335 params.hidden = GetWidget()->is_hidden();
335 params.never_visible = delegate_->IsNeverVisible(); 336 params.never_visible = delegate_->IsNeverVisible();
336 params.window_was_created_with_opener = window_was_created_with_opener; 337 params.window_was_created_with_opener = window_was_created_with_opener;
337 params.next_page_id = next_page_id; 338 params.next_page_id = next_page_id;
338 params.enable_auto_resize = GetWidget()->auto_resize_enabled(); 339 params.enable_auto_resize = GetWidget()->auto_resize_enabled();
339 params.min_size = GetWidget()->min_size_for_auto_resize(); 340 params.min_size = GetWidget()->min_size_for_auto_resize();
340 params.max_size = GetWidget()->max_size_for_auto_resize(); 341 params.max_size = GetWidget()->max_size_for_auto_resize();
342 params.image_decode_color_profile = gfx::ColorProfile().profile();
ccameron 2016/03/15 06:02:24 Note that this default constructor actually comput
341 GetWidget()->GetResizeParams(&params.initial_size); 343 GetWidget()->GetResizeParams(&params.initial_size);
342 344
343 if (!Send(new ViewMsg_New(params))) 345 if (!Send(new ViewMsg_New(params)))
344 return false; 346 return false;
345 GetWidget()->SetInitialRenderSizeParams(params.initial_size); 347 GetWidget()->SetInitialRenderSizeParams(params.initial_size);
346 348
347 // If the RWHV has not yet been set, the surface ID namespace will get 349 // If the RWHV has not yet been set, the surface ID namespace will get
348 // passed down by the call to SetView(). 350 // passed down by the call to SetView().
349 if (GetWidget()->GetView()) { 351 if (GetWidget()->GetView()) {
350 Send(new ViewMsg_SetSurfaceIdNamespace( 352 Send(new ViewMsg_SetSurfaceIdNamespace(
(...skipping 1002 matching lines...) Expand 10 before | Expand all | Expand 10 after
1353 } else { 1355 } else {
1354 render_view_ready_on_process_launch_ = true; 1356 render_view_ready_on_process_launch_ = true;
1355 } 1357 }
1356 } 1358 }
1357 1359
1358 void RenderViewHostImpl::RenderViewReady() { 1360 void RenderViewHostImpl::RenderViewReady() {
1359 delegate_->RenderViewReady(this); 1361 delegate_->RenderViewReady(this);
1360 } 1362 }
1361 1363
1362 } // namespace content 1364 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698