OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_manager.h" | 5 #include "media/midi/midi_manager.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "base/metrics/histogram_macros.h" | 9 #include "base/metrics/histogram_macros.h" |
10 #include "base/trace_event/trace_event.h" | 10 #include "base/trace_event/trace_event.h" |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 } | 48 } |
49 | 49 |
50 MidiManager::~MidiManager() { | 50 MidiManager::~MidiManager() { |
51 UMA_HISTOGRAM_ENUMERATION("Media.Midi.ResultOnShutdown", | 51 UMA_HISTOGRAM_ENUMERATION("Media.Midi.ResultOnShutdown", |
52 static_cast<Sample>(result_), | 52 static_cast<Sample>(result_), |
53 static_cast<Sample>(Result::MAX) + 1); | 53 static_cast<Sample>(Result::MAX) + 1); |
54 } | 54 } |
55 | 55 |
56 #if !defined(OS_MACOSX) && !defined(OS_WIN) && \ | 56 #if !defined(OS_MACOSX) && !defined(OS_WIN) && \ |
57 !(defined(USE_ALSA) && defined(USE_UDEV)) && !defined(OS_ANDROID) | 57 !(defined(USE_ALSA) && defined(USE_UDEV)) && !defined(OS_ANDROID) |
58 MidiManager* MidiManager::Create() { | 58 MidiManager* MidiManager::Create(const CreationOptions&) { |
59 ReportUsage(Usage::CREATED_ON_UNSUPPORTED_PLATFORMS); | 59 ReportUsage(Usage::CREATED_ON_UNSUPPORTED_PLATFORMS); |
60 return new MidiManager; | 60 return new MidiManager; |
61 } | 61 } |
62 #endif | 62 #endif |
63 | 63 |
64 void MidiManager::StartSession(MidiManagerClient* client) { | 64 void MidiManager::StartSession(MidiManagerClient* client) { |
65 ReportUsage(Usage::SESSION_STARTED); | 65 ReportUsage(Usage::SESSION_STARTED); |
66 | 66 |
67 bool session_is_ready; | 67 bool session_is_ready; |
68 bool session_needs_initialization = false; | 68 bool session_needs_initialization = false; |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 lock_.AssertAcquired(); | 237 lock_.AssertAcquired(); |
238 | 238 |
239 for (const auto& info : input_ports_) | 239 for (const auto& info : input_ports_) |
240 client->AddInputPort(info); | 240 client->AddInputPort(info); |
241 for (const auto& info : output_ports_) | 241 for (const auto& info : output_ports_) |
242 client->AddOutputPort(info); | 242 client->AddOutputPort(info); |
243 } | 243 } |
244 | 244 |
245 } // namespace midi | 245 } // namespace midi |
246 } // namespace media | 246 } // namespace media |
OLD | NEW |