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

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

Issue 2785883004: Add missing TaskScheduler on tests using RendereWidgetHostImpl (Closed)
Patch Set: yet another mac fix Created 3 years, 8 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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 last_event_type_(blink::WebInputEvent::Undefined), 292 last_event_type_(blink::WebInputEvent::Undefined),
293 new_content_rendering_delay_( 293 new_content_rendering_delay_(
294 base::TimeDelta::FromMilliseconds(kNewContentRenderingDelayMs)), 294 base::TimeDelta::FromMilliseconds(kNewContentRenderingDelayMs)),
295 current_content_source_id_(0), 295 current_content_source_id_(0),
296 monitoring_composition_info_(false), 296 monitoring_composition_info_(false),
297 weak_factory_(this) { 297 weak_factory_(this) {
298 CHECK(delegate_); 298 CHECK(delegate_);
299 CHECK_NE(MSG_ROUTING_NONE, routing_id_); 299 CHECK_NE(MSG_ROUTING_NONE, routing_id_);
300 latency_tracker_.SetDelegate(delegate_); 300 latency_tracker_.SetDelegate(delegate_);
301 301
302 DCHECK(base::TaskScheduler::GetInstance())
303 << "Ref. Prerequisite section of post_task.h";
302 #if defined(OS_WIN) 304 #if defined(OS_WIN)
303 // Update the display color profile cache so that it is likely to be up to 305 // Update the display color profile cache so that it is likely to be up to
304 // date when the renderer process requests the color profile. 306 // date when the renderer process requests the color profile.
305 if (gfx::ICCProfile::CachedProfilesNeedUpdate()) { 307 if (gfx::ICCProfile::CachedProfilesNeedUpdate()) {
306 base::PostTaskWithTraits( 308 base::PostTaskWithTraits(
307 FROM_HERE, base::TaskTraits().MayBlock().WithPriority( 309 FROM_HERE, base::TaskTraits().MayBlock().WithPriority(
308 base::TaskPriority::BACKGROUND), 310 base::TaskPriority::BACKGROUND),
309 base::Bind(&gfx::ICCProfile::UpdateCachedProfilesOnBackgroundThread)); 311 base::Bind(&gfx::ICCProfile::UpdateCachedProfilesOnBackgroundThread));
310 } 312 }
311 #endif 313 #endif
(...skipping 2341 matching lines...) Expand 10 before | Expand all | Expand 10 after
2653 2655
2654 // After navigation, if a frame belonging to the new page is received, stop 2656 // After navigation, if a frame belonging to the new page is received, stop
2655 // the timer that triggers clearing the graphics of the last page. 2657 // the timer that triggers clearing the graphics of the last page.
2656 if (last_received_content_source_id_ >= current_content_source_id_ && 2658 if (last_received_content_source_id_ >= current_content_source_id_ &&
2657 new_content_rendering_timeout_->IsRunning()) { 2659 new_content_rendering_timeout_->IsRunning()) {
2658 new_content_rendering_timeout_->Stop(); 2660 new_content_rendering_timeout_->Stop();
2659 } 2661 }
2660 } 2662 }
2661 2663
2662 } // namespace content 2664 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698