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 "content/browser/media/midi_host.h" | 5 #include "content/browser/media/midi_host.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
10 #include "base/process/process.h" | 10 #include "base/process/process.h" |
11 #include "base/trace_event/trace_event.h" | 11 #include "base/trace_event/trace_event.h" |
12 #include "content/browser/bad_message.h" | 12 #include "content/browser/bad_message.h" |
13 #include "content/browser/browser_main_loop.h" | 13 #include "content/browser/browser_main_loop.h" |
14 #include "content/browser/child_process_security_policy_impl.h" | 14 #include "content/browser/child_process_security_policy_impl.h" |
15 #include "content/common/media/midi_messages.h" | 15 #include "content/common/media/midi_messages.h" |
16 #include "content/public/browser/content_browser_client.h" | 16 #include "content/public/browser/content_browser_client.h" |
17 #include "content/public/browser/user_metrics.h" | |
18 #include "media/midi/message_util.h" | 17 #include "media/midi/message_util.h" |
19 #include "media/midi/midi_message_queue.h" | 18 #include "media/midi/midi_message_queue.h" |
20 #include "media/midi/midi_service.h" | 19 #include "media/midi/midi_service.h" |
21 | 20 |
22 namespace content { | 21 namespace content { |
23 namespace { | 22 namespace { |
24 | 23 |
25 // The total number of bytes which we're allowed to send to the OS | 24 // The total number of bytes which we're allowed to send to the OS |
26 // before knowing that they have been successfully sent. | 25 // before knowing that they have been successfully sent. |
27 const size_t kMaxInFlightBytes = 10 * 1024 * 1024; // 10 MB. | 26 const size_t kMaxInFlightBytes = 10 * 1024 * 1024; // 10 MB. |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 bytes_sent_since_last_acknowledgement_)); | 219 bytes_sent_since_last_acknowledgement_)); |
221 bytes_sent_since_last_acknowledgement_ = 0; | 220 bytes_sent_since_last_acknowledgement_ = 0; |
222 } | 221 } |
223 } | 222 } |
224 | 223 |
225 void MidiHost::Detach() { | 224 void MidiHost::Detach() { |
226 midi_service_ = nullptr; | 225 midi_service_ = nullptr; |
227 } | 226 } |
228 | 227 |
229 } // namespace content | 228 } // namespace content |
OLD | NEW |