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

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

Issue 2673423002: Web MIDI: add dynamic MidiManager instantiation support for Linux (Closed)
Patch Set: rebase again Created 3 years, 10 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_manager_winrt.h ('k') | media/midi/midi_service.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_winrt.h" 5 #include "media/midi/midi_manager_winrt.h"
6 6
7 #pragma warning(disable : 4467) 7 #pragma warning(disable : 4467)
8 8
9 #include <initguid.h> // Required by <devpkey.h> 9 #include <initguid.h> // Required by <devpkey.h>
10 10
(...skipping 889 matching lines...) Expand 10 before | Expand all | Expand 10 after
900 900
901 return weak_factory_.GetWeakPtr(); 901 return weak_factory_.GetWeakPtr();
902 } 902 }
903 903
904 // Last member to ensure destructed first. 904 // Last member to ensure destructed first.
905 base::WeakPtrFactory<MidiOutPortManager> weak_factory_; 905 base::WeakPtrFactory<MidiOutPortManager> weak_factory_;
906 906
907 DISALLOW_COPY_AND_ASSIGN(MidiOutPortManager); 907 DISALLOW_COPY_AND_ASSIGN(MidiOutPortManager);
908 }; 908 };
909 909
910 MidiManagerWinrt::MidiManagerWinrt() : com_thread_("Windows MIDI COM Thread") {} 910 MidiManagerWinrt::MidiManagerWinrt(MidiService* service)
911 : MidiManager(service), com_thread_("Windows MIDI COM Thread") {}
911 912
912 MidiManagerWinrt::~MidiManagerWinrt() { 913 MidiManagerWinrt::~MidiManagerWinrt() {
913 base::AutoLock auto_lock(lazy_init_member_lock_); 914 base::AutoLock auto_lock(lazy_init_member_lock_);
914 915
915 CHECK(!com_thread_checker_); 916 CHECK(!com_thread_checker_);
916 CHECK(!port_manager_in_); 917 CHECK(!port_manager_in_);
917 CHECK(!port_manager_out_); 918 CHECK(!port_manager_out_);
918 CHECK(!scheduler_); 919 CHECK(!scheduler_);
919 } 920 }
920 921
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
1040 1041
1041 void MidiManagerWinrt::OnPortManagerReady() { 1042 void MidiManagerWinrt::OnPortManagerReady() {
1042 DCHECK(com_thread_checker_->CalledOnValidThread()); 1043 DCHECK(com_thread_checker_->CalledOnValidThread());
1043 DCHECK(port_manager_ready_count_ < 2); 1044 DCHECK(port_manager_ready_count_ < 2);
1044 1045
1045 if (++port_manager_ready_count_ == 2) 1046 if (++port_manager_ready_count_ == 2)
1046 CompleteInitialization(Result::OK); 1047 CompleteInitialization(Result::OK);
1047 } 1048 }
1048 1049
1049 } // namespace midi 1050 } // namespace midi
OLDNEW
« no previous file with comments | « media/midi/midi_manager_winrt.h ('k') | media/midi/midi_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698