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

Side by Side Diff: media/midi/midi_scheduler.cc

Issue 2418493002: //media/midi: use top level namespace midi rather than media.midi (Closed)
Patch Set: TAG name change s/media_midi/midi/ Created 4 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
« no previous file with comments | « media/midi/midi_scheduler.h ('k') | media/midi/result.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "media/midi/midi_scheduler.h" 5 #include "media/midi/midi_scheduler.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/location.h" 10 #include "base/location.h"
11 #include "base/threading/thread_task_runner_handle.h" 11 #include "base/threading/thread_task_runner_handle.h"
12 #include "base/time/time.h" 12 #include "base/time/time.h"
13 #include "media/midi/midi_manager.h" 13 #include "media/midi/midi_manager.h"
14 14
15 namespace media {
16 namespace midi { 15 namespace midi {
17 16
18 MidiScheduler::MidiScheduler(MidiManager* manager) 17 MidiScheduler::MidiScheduler(MidiManager* manager)
19 : manager_(manager), 18 : manager_(manager),
20 task_runner_(base::ThreadTaskRunnerHandle::Get()), 19 task_runner_(base::ThreadTaskRunnerHandle::Get()),
21 weak_factory_(this) {} 20 weak_factory_(this) {}
22 21
23 MidiScheduler::~MidiScheduler() { 22 MidiScheduler::~MidiScheduler() {
24 DCHECK(thread_checker_.CalledOnValidThread()); 23 DCHECK(thread_checker_.CalledOnValidThread());
25 } 24 }
(...skipping 26 matching lines...) Expand all
52 51
53 void MidiScheduler::InvokeClosure(MidiManagerClient* client, 52 void MidiScheduler::InvokeClosure(MidiManagerClient* client,
54 size_t length, 53 size_t length,
55 const base::Closure& closure) { 54 const base::Closure& closure) {
56 DCHECK(thread_checker_.CalledOnValidThread()); 55 DCHECK(thread_checker_.CalledOnValidThread());
57 closure.Run(); 56 closure.Run();
58 manager_->AccumulateMidiBytesSent(client, length); 57 manager_->AccumulateMidiBytesSent(client, length);
59 } 58 }
60 59
61 } // namespace midi 60 } // namespace midi
62 } // namespace media
OLDNEW
« no previous file with comments | « media/midi/midi_scheduler.h ('k') | media/midi/result.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698