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_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 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 CHECK_NE(MSG_ROUTING_NONE, routing_id_); | 304 CHECK_NE(MSG_ROUTING_NONE, routing_id_); |
305 latency_tracker_.SetDelegate(delegate_); | 305 latency_tracker_.SetDelegate(delegate_); |
306 | 306 |
307 DCHECK(base::TaskScheduler::GetInstance()) | 307 DCHECK(base::TaskScheduler::GetInstance()) |
308 << "Ref. Prerequisite section of post_task.h"; | 308 << "Ref. Prerequisite section of post_task.h"; |
309 #if defined(OS_WIN) | 309 #if defined(OS_WIN) |
310 // Update the display color profile cache so that it is likely to be up to | 310 // Update the display color profile cache so that it is likely to be up to |
311 // date when the renderer process requests the color profile. | 311 // date when the renderer process requests the color profile. |
312 if (gfx::ICCProfile::CachedProfilesNeedUpdate()) { | 312 if (gfx::ICCProfile::CachedProfilesNeedUpdate()) { |
313 base::PostTaskWithTraits( | 313 base::PostTaskWithTraits( |
314 FROM_HERE, base::TaskTraits().MayBlock().WithPriority( | 314 FROM_HERE, {base::MayBlock(), base::TaskPriority::BACKGROUND}, |
315 base::TaskPriority::BACKGROUND), | |
316 base::Bind(&gfx::ICCProfile::UpdateCachedProfilesOnBackgroundThread)); | 315 base::Bind(&gfx::ICCProfile::UpdateCachedProfilesOnBackgroundThread)); |
317 } | 316 } |
318 #endif | 317 #endif |
319 | 318 |
320 std::pair<RoutingIDWidgetMap::iterator, bool> result = | 319 std::pair<RoutingIDWidgetMap::iterator, bool> result = |
321 g_routing_id_widget_map.Get().insert(std::make_pair( | 320 g_routing_id_widget_map.Get().insert(std::make_pair( |
322 RenderWidgetHostID(process->GetID(), routing_id_), this)); | 321 RenderWidgetHostID(process->GetID(), routing_id_), this)); |
323 CHECK(result.second) << "Inserting a duplicate item!"; | 322 CHECK(result.second) << "Inserting a duplicate item!"; |
324 process_->AddRoute(routing_id_, this); | 323 process_->AddRoute(routing_id_, this); |
325 process_->AddWidget(this); | 324 process_->AddWidget(this); |
(...skipping 2309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2635 RenderProcessHost* rph = GetProcess(); | 2634 RenderProcessHost* rph = GetProcess(); |
2636 for (std::vector<IPC::Message>::const_iterator i = messages.begin(); | 2635 for (std::vector<IPC::Message>::const_iterator i = messages.begin(); |
2637 i != messages.end(); ++i) { | 2636 i != messages.end(); ++i) { |
2638 rph->OnMessageReceived(*i); | 2637 rph->OnMessageReceived(*i); |
2639 if (i->dispatch_error()) | 2638 if (i->dispatch_error()) |
2640 rph->OnBadMessageReceived(*i); | 2639 rph->OnBadMessageReceived(*i); |
2641 } | 2640 } |
2642 } | 2641 } |
2643 | 2642 |
2644 } // namespace content | 2643 } // namespace content |
OLD | NEW |