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

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

Issue 501033003: Remove implicit conversions from scoped_refptr to T* in content/browser/renderer_host/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « content/browser/renderer_host/render_widget_host_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_resize_helper.h" 5 #include "content/browser/renderer_host/render_widget_resize_helper.h"
6 6
7 #include <list> 7 #include <list>
8 8
9 #include "content/browser/gpu/gpu_process_host_ui_shim.h" 9 #include "content/browser/gpu/gpu_process_host_ui_shim.h"
10 #include "content/browser/renderer_host/render_process_host_impl.h" 10 #include "content/browser/renderer_host/render_process_host_impl.h"
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 pumpable_task_runner_ = pumpable_task_runner; 166 pumpable_task_runner_ = pumpable_task_runner;
167 base::AutoLock lock(pumpable_task_runner_->task_queue_lock_); 167 base::AutoLock lock(pumpable_task_runner_->task_queue_lock_);
168 static uint64 last_sequence_number = 0; 168 static uint64 last_sequence_number = 0;
169 last_sequence_number += 1; 169 last_sequence_number += 1;
170 sequence_number_ = last_sequence_number; 170 sequence_number_ = last_sequence_number;
171 iterator_ = pumpable_task_runner_->task_queue_.insert( 171 iterator_ = pumpable_task_runner_->task_queue_.insert(
172 pumpable_task_runner_->task_queue_.end(), this); 172 pumpable_task_runner_->task_queue_.end(), this);
173 } 173 }
174 174
175 void WrappedTask::RemoveFromTaskRunnerQueue() { 175 void WrappedTask::RemoveFromTaskRunnerQueue() {
176 if (!pumpable_task_runner_) 176 if (!pumpable_task_runner_.get())
177 return; 177 return;
178 // The scope of the task runner's lock must be limited because removing 178 // The scope of the task runner's lock must be limited because removing
179 // this reference to the task runner may destroy it. 179 // this reference to the task runner may destroy it.
180 { 180 {
181 base::AutoLock lock(pumpable_task_runner_->task_queue_lock_); 181 base::AutoLock lock(pumpable_task_runner_->task_queue_lock_);
182 pumpable_task_runner_->task_queue_.erase(iterator_); 182 pumpable_task_runner_->task_queue_.erase(iterator_);
183 iterator_ = pumpable_task_runner_->task_queue_.end(); 183 iterator_ = pumpable_task_runner_->task_queue_.end();
184 } 184 }
185 pumpable_task_runner_ = NULL; 185 pumpable_task_runner_ = NULL;
186 } 186 }
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 348
349 // static 349 // static
350 void RenderWidgetResizeHelper::EventTimedWait( 350 void RenderWidgetResizeHelper::EventTimedWait(
351 base::WaitableEvent* event, base::TimeDelta delay) { 351 base::WaitableEvent* event, base::TimeDelta delay) {
352 base::ThreadRestrictions::ScopedAllowWait allow_wait; 352 base::ThreadRestrictions::ScopedAllowWait allow_wait;
353 event->TimedWait(delay); 353 event->TimedWait(delay);
354 } 354 }
355 355
356 } // namespace content 356 } // namespace content
357 357
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698