OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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_win.h" | 5 #include "media/midi/midi_manager_win.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 #include <ks.h> | 8 #include <ks.h> |
9 #include <ksmedia.h> | 9 #include <ksmedia.h> |
10 #include <mmreg.h> | 10 #include <mmreg.h> |
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
547 } | 547 } |
548 } | 548 } |
549 | 549 |
550 // base::SystemMonitor::DevicesChangedObserver overrides: | 550 // base::SystemMonitor::DevicesChangedObserver overrides: |
551 void OnDevicesChanged(base::SystemMonitor::DeviceType device_type) final { | 551 void OnDevicesChanged(base::SystemMonitor::DeviceType device_type) final { |
552 DCHECK(thread_checker_.CalledOnValidThread()); | 552 DCHECK(thread_checker_.CalledOnValidThread()); |
553 if (destructor_started) | 553 if (destructor_started) |
554 return; | 554 return; |
555 | 555 |
556 switch (device_type) { | 556 switch (device_type) { |
557 case base::SystemMonitor::DEVTYPE_AUDIO_CAPTURE: | 557 case base::SystemMonitor::DEVTYPE_AUDIO: |
558 case base::SystemMonitor::DEVTYPE_VIDEO_CAPTURE: | 558 case base::SystemMonitor::DEVTYPE_VIDEO_CAPTURE: |
559 // Add case of other unrelated device types here. | 559 // Add case of other unrelated device types here. |
560 return; | 560 return; |
561 case base::SystemMonitor::DEVTYPE_UNKNOWN: | 561 case base::SystemMonitor::DEVTYPE_UNKNOWN: |
562 // Interested in MIDI devices. Try updating the device list. | 562 // Interested in MIDI devices. Try updating the device list. |
563 UpdateDeviceList(); | 563 UpdateDeviceList(); |
564 break; | 564 break; |
565 // No default here to capture new DeviceType by compile time. | 565 // No default here to capture new DeviceType by compile time. |
566 } | 566 } |
567 } | 567 } |
(...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1195 MidiManager* MidiManager::Create() { | 1195 MidiManager* MidiManager::Create() { |
1196 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 1196 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
1197 switches::kUseWinrtMidiApi) && | 1197 switches::kUseWinrtMidiApi) && |
1198 base::win::GetVersion() >= base::win::VERSION_WIN10) | 1198 base::win::GetVersion() >= base::win::VERSION_WIN10) |
1199 return new MidiManagerWinrt(); | 1199 return new MidiManagerWinrt(); |
1200 return new MidiManagerWin(); | 1200 return new MidiManagerWin(); |
1201 } | 1201 } |
1202 | 1202 |
1203 } // namespace midi | 1203 } // namespace midi |
1204 } // namespace media | 1204 } // namespace media |
OLD | NEW |