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

Side by Side Diff: content/browser/renderer_host/render_widget_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: leave empty check Created 4 years, 5 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_widget_host_impl.h" 5 #include "content/browser/renderer_host/render_widget_host_impl.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 8
9 #include <set> 9 #include <set>
10 #include <tuple> 10 #include <tuple>
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 #include "content/public/common/result_codes.h" 69 #include "content/public/common/result_codes.h"
70 #include "content/public/common/web_preferences.h" 70 #include "content/public/common/web_preferences.h"
71 #include "gpu/GLES2/gl2extchromium.h" 71 #include "gpu/GLES2/gl2extchromium.h"
72 #include "gpu/command_buffer/service/gpu_switches.h" 72 #include "gpu/command_buffer/service/gpu_switches.h"
73 #include "gpu/ipc/common/gpu_messages.h" 73 #include "gpu/ipc/common/gpu_messages.h"
74 #include "skia/ext/image_operations.h" 74 #include "skia/ext/image_operations.h"
75 #include "skia/ext/platform_canvas.h" 75 #include "skia/ext/platform_canvas.h"
76 #include "third_party/WebKit/public/web/WebCompositionUnderline.h" 76 #include "third_party/WebKit/public/web/WebCompositionUnderline.h"
77 #include "ui/events/event.h" 77 #include "ui/events/event.h"
78 #include "ui/events/keycodes/keyboard_codes.h" 78 #include "ui/events/keycodes/keyboard_codes.h"
79 #include "ui/gfx/color_profile.h"
79 #include "ui/gfx/geometry/size_conversions.h" 80 #include "ui/gfx/geometry/size_conversions.h"
80 #include "ui/gfx/geometry/vector2d_conversions.h" 81 #include "ui/gfx/geometry/vector2d_conversions.h"
81 #include "ui/gfx/skbitmap_operations.h" 82 #include "ui/gfx/skbitmap_operations.h"
82 #include "ui/snapshot/snapshot.h" 83 #include "ui/snapshot/snapshot.h"
83 84
84 #if defined(OS_MACOSX) 85 #if defined(OS_MACOSX)
85 #include "device/power_save_blocker/power_save_blocker.h" 86 #include "device/power_save_blocker/power_save_blocker.h"
86 #include "ui/accelerated_widget_mac/window_resize_helper_mac.h" 87 #include "ui/accelerated_widget_mac/window_resize_helper_mac.h"
87 #endif 88 #endif
88 89
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 owned_by_render_frame_host_(false), 211 owned_by_render_frame_host_(false),
211 is_focused_(false), 212 is_focused_(false),
212 hung_renderer_delay_( 213 hung_renderer_delay_(
213 base::TimeDelta::FromMilliseconds(kHungRendererDelayMs)), 214 base::TimeDelta::FromMilliseconds(kHungRendererDelayMs)),
214 new_content_rendering_delay_( 215 new_content_rendering_delay_(
215 base::TimeDelta::FromMilliseconds(kNewContentRenderingDelayMs)), 216 base::TimeDelta::FromMilliseconds(kNewContentRenderingDelayMs)),
216 weak_factory_(this) { 217 weak_factory_(this) {
217 CHECK(delegate_); 218 CHECK(delegate_);
218 CHECK_NE(MSG_ROUTING_NONE, routing_id_); 219 CHECK_NE(MSG_ROUTING_NONE, routing_id_);
219 220
221 #if defined(OS_WIN)
222 // Update the display color profile cache so that it is likely to be up to
223 // date when the renderer process requests the color profile.
224 if (gfx::ColorProfile::CachedProfilesNeedUpdate()) {
225 BrowserThread::PostBlockingPoolTask(
226 FROM_HERE,
227 base::Bind(&gfx::ColorProfile::UpdateCachedProfilesOnBackgroundThread));
228 }
229 #endif
230
220 std::pair<RoutingIDWidgetMap::iterator, bool> result = 231 std::pair<RoutingIDWidgetMap::iterator, bool> result =
221 g_routing_id_widget_map.Get().insert(std::make_pair( 232 g_routing_id_widget_map.Get().insert(std::make_pair(
222 RenderWidgetHostID(process->GetID(), routing_id_), this)); 233 RenderWidgetHostID(process->GetID(), routing_id_), this));
223 CHECK(result.second) << "Inserting a duplicate item!"; 234 CHECK(result.second) << "Inserting a duplicate item!";
224 process_->AddRoute(routing_id_, this); 235 process_->AddRoute(routing_id_, this);
225 236
226 // If we're initially visible, tell the process host that we're alive. 237 // If we're initially visible, tell the process host that we're alive.
227 // Otherwise we'll notify the process host when we are first shown. 238 // Otherwise we'll notify the process host when we are first shown.
228 if (!hidden) 239 if (!hidden)
229 process_->WidgetRestored(); 240 process_->WidgetRestored();
(...skipping 1914 matching lines...) Expand 10 before | Expand all | Expand 10 after
2144 return delegate_ ? delegate_->GetRootBrowserAccessibilityManager() : NULL; 2155 return delegate_ ? delegate_->GetRootBrowserAccessibilityManager() : NULL;
2145 } 2156 }
2146 2157
2147 BrowserAccessibilityManager* 2158 BrowserAccessibilityManager*
2148 RenderWidgetHostImpl::GetOrCreateRootBrowserAccessibilityManager() { 2159 RenderWidgetHostImpl::GetOrCreateRootBrowserAccessibilityManager() {
2149 return delegate_ ? 2160 return delegate_ ?
2150 delegate_->GetOrCreateRootBrowserAccessibilityManager() : NULL; 2161 delegate_->GetOrCreateRootBrowserAccessibilityManager() : NULL;
2151 } 2162 }
2152 2163
2153 } // namespace content 2164 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_view_host_impl.cc ('k') | content/common/render_process_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698