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

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

Issue 1117603002: media/midi: Fix warnings found by clang chromium-style plugin on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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_win.h ('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 1075 matching lines...) Expand 10 before | Expand all | Expand 10 after
1086 // This flag can be used as the signal that when background tasks must be 1086 // This flag can be used as the signal that when background tasks must be
1087 // interrupted. 1087 // interrupted.
1088 // TODO(toyoshim): Use std::atomic<bool> when it is allowed. 1088 // TODO(toyoshim): Use std::atomic<bool> when it is allowed.
1089 volatile bool destructor_started; 1089 volatile bool destructor_started;
1090 1090
1091 DISALLOW_COPY_AND_ASSIGN(MidiServiceWinImpl); 1091 DISALLOW_COPY_AND_ASSIGN(MidiServiceWinImpl);
1092 }; 1092 };
1093 1093
1094 } // namespace 1094 } // namespace
1095 1095
1096 MidiManagerWin::MidiManagerWin() {
1097 }
1098
1099 MidiManagerWin::~MidiManagerWin() {
1100 midi_service_.reset();
Nico 2015/04/29 03:21:49 Is the explicit reset() call needed at all? There'
1101 }
1102
1096 void MidiManagerWin::StartInitialization() { 1103 void MidiManagerWin::StartInitialization() {
1097 midi_service_.reset(new MidiServiceWinImpl); 1104 midi_service_.reset(new MidiServiceWinImpl);
1098 // Note that |CompleteInitialization()| will be called from the callback. 1105 // Note that |CompleteInitialization()| will be called from the callback.
1099 midi_service_->InitializeAsync(this); 1106 midi_service_->InitializeAsync(this);
1100 } 1107 }
1101 1108
1102 void MidiManagerWin::DispatchSendMidiData(MidiManagerClient* client, 1109 void MidiManagerWin::DispatchSendMidiData(MidiManagerClient* client,
1103 uint32 port_index, 1110 uint32 port_index,
1104 const std::vector<uint8>& data, 1111 const std::vector<uint8>& data,
1105 double timestamp) { 1112 double timestamp) {
(...skipping 11 matching lines...) Expand all
1117 // TOOD(toyoshim): This calculation should be done when the date is actually 1124 // TOOD(toyoshim): This calculation should be done when the date is actually
1118 // sent. 1125 // sent.
1119 client->AccumulateMidiBytesSent(data.size()); 1126 client->AccumulateMidiBytesSent(data.size());
1120 } 1127 }
1121 1128
1122 MidiManager* MidiManager::Create() { 1129 MidiManager* MidiManager::Create() {
1123 return new MidiManagerWin(); 1130 return new MidiManagerWin();
1124 } 1131 }
1125 1132
1126 } // namespace media 1133 } // namespace media
OLDNEW
« no previous file with comments | « media/midi/midi_manager_win.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698