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

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

Issue 667943003: Standardize usage of virtual/override/final in content/browser/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 WrappedTask* task, 65 WrappedTask* task,
66 base::TimeDelta delay); 66 base::TimeDelta delay);
67 67
68 // Wait at most |max_delay| to run an enqueued task. 68 // Wait at most |max_delay| to run an enqueued task.
69 bool WaitForSingleWrappedTaskToRun(const base::TimeDelta& max_delay); 69 bool WaitForSingleWrappedTaskToRun(const base::TimeDelta& max_delay);
70 70
71 // Remove a wrapped task from the queue. 71 // Remove a wrapped task from the queue.
72 void RemoveWrappedTaskFromQueue(WrappedTask* task); 72 void RemoveWrappedTaskFromQueue(WrappedTask* task);
73 73
74 // base::SingleThreadTaskRunner implementation: 74 // base::SingleThreadTaskRunner implementation:
75 virtual bool PostDelayedTask(const tracked_objects::Location& from_here, 75 bool PostDelayedTask(const tracked_objects::Location& from_here,
76 const base::Closure& task, 76 const base::Closure& task,
77 base::TimeDelta delay) override; 77 base::TimeDelta delay) override;
78 78
79 virtual bool PostNonNestableDelayedTask( 79 bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here,
80 const tracked_objects::Location& from_here, 80 const base::Closure& task,
81 const base::Closure& task, 81 base::TimeDelta delay) override;
82 base::TimeDelta delay) override;
83 82
84 virtual bool RunsTasksOnCurrentThread() const override; 83 bool RunsTasksOnCurrentThread() const override;
85 84
86 private: 85 private:
87 friend class WrappedTask; 86 friend class WrappedTask;
88 87
89 virtual ~PumpableTaskRunner(); 88 ~PumpableTaskRunner() override;
90 89
91 // A queue of live messages. Must hold |task_queue_lock_| to access. Tasks 90 // A queue of live messages. Must hold |task_queue_lock_| to access. Tasks
92 // are added only on the IO thread and removed only on the UI thread. The 91 // are added only on the IO thread and removed only on the UI thread. The
93 // WrappedTask objects are removed from the queue when they are run (by 92 // WrappedTask objects are removed from the queue when they are run (by
94 // |target_task_runner_| or by a call to WaitForSingleWrappedTaskToRun 93 // |target_task_runner_| or by a call to WaitForSingleWrappedTaskToRun
95 // removing them out of the queue, or by TaskRunner when it is destroyed). 94 // removing them out of the queue, or by TaskRunner when it is destroyed).
96 WrappedTaskQueue task_queue_; 95 WrappedTaskQueue task_queue_;
97 base::Lock task_queue_lock_; 96 base::Lock task_queue_lock_;
98 97
99 // Event used to wake up the UI thread if it is sleeping in 98 // Event used to wake up the UI thread if it is sleeping in
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 347
349 // static 348 // static
350 void RenderWidgetResizeHelper::EventTimedWait( 349 void RenderWidgetResizeHelper::EventTimedWait(
351 base::WaitableEvent* event, base::TimeDelta delay) { 350 base::WaitableEvent* event, base::TimeDelta delay) {
352 base::ThreadRestrictions::ScopedAllowWait allow_wait; 351 base::ThreadRestrictions::ScopedAllowWait allow_wait;
353 event->TimedWait(delay); 352 event->TimedWait(delay);
354 } 353 }
355 354
356 } // namespace content 355 } // namespace content
357 356
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698