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

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

Issue 2326623003: Make SystemMonitor report all audio device changes instead of just audio capture. (Closed)
Patch Set: Created 4 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 | « media/device_monitors/system_message_window_win.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 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
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
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
OLDNEW
« no previous file with comments | « media/device_monitors/system_message_window_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698