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

Unified Diff: components/test_runner/mock_web_midi_accessor.cc

Issue 2422163002: Web MIDI: use midi_service.mojom for media::midi::PortState (Closed)
Patch Set: gn --check fix Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/browser/media/midi_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/test_runner/mock_web_midi_accessor.cc
diff --git a/components/test_runner/mock_web_midi_accessor.cc b/components/test_runner/mock_web_midi_accessor.cc
index e14e084c9ab1e5d0a3fb59326011d4a2c9882332..e6f95de5ddeffd8cfbcbeaa14a832a0bd5537175 100644
--- a/components/test_runner/mock_web_midi_accessor.cc
+++ b/components/test_runner/mock_web_midi_accessor.cc
@@ -14,6 +14,7 @@
#include "third_party/WebKit/public/platform/WebString.h"
#include "third_party/WebKit/public/platform/modules/webmidi/WebMIDIAccessorClient.h"
+using midi::mojom::PortState;
using midi::mojom::Result;
namespace test_runner {
@@ -27,18 +28,12 @@ MockWebMIDIAccessor::~MockWebMIDIAccessor() {
void MockWebMIDIAccessor::startSession() {
// Add a mock input and output port.
- blink::WebMIDIAccessorClient::MIDIPortState state =
- blink::WebMIDIAccessorClient::MIDIPortStateConnected;
- client_->didAddInputPort("MockInputID",
- "MockInputManufacturer",
- "MockInputName",
- "MockInputVersion",
- state);
- client_->didAddOutputPort("MockOutputID",
- "MockOutputManufacturer",
- "MockOutputName",
- "MockOutputVersion",
- state);
+ client_->didAddInputPort("MockInputID", "MockInputManufacturer",
+ "MockInputName", "MockInputVersion",
+ PortState::CONNECTED);
+ client_->didAddOutputPort("MockOutputID", "MockOutputManufacturer",
+ "MockOutputName", "MockOutputVersion",
+ PortState::CONNECTED);
interfaces_->GetDelegate()->PostTask(base::Bind(
&MockWebMIDIAccessor::ReportStartedSession, weak_factory_.GetWeakPtr(),
interfaces_->GetTestRunner()->midiAccessorResult()));
« no previous file with comments | « no previous file | content/browser/media/midi_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698