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

Side by Side Diff: content/shell/renderer/test_runner/mock_web_midi_accessor.cc

Issue 661323002: Web MIDI: use new Blink APIs to be free from depracated ones (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review #3 Created 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/shell/renderer/test_runner/mock_web_midi_accessor.h" 5 #include "content/shell/renderer/test_runner/mock_web_midi_accessor.h"
6 6
7 #include "content/shell/renderer/test_runner/test_interfaces.h" 7 #include "content/shell/renderer/test_runner/test_interfaces.h"
8 #include "content/shell/renderer/test_runner/test_runner.h" 8 #include "content/shell/renderer/test_runner/test_runner.h"
9 #include "content/shell/renderer/test_runner/web_test_delegate.h" 9 #include "content/shell/renderer/test_runner/web_test_delegate.h"
10 #include "content/shell/renderer/test_runner/web_test_runner.h" 10 #include "content/shell/renderer/test_runner/web_test_runner.h"
(...skipping 28 matching lines...) Expand all
39 MockWebMIDIAccessor::MockWebMIDIAccessor(blink::WebMIDIAccessorClient* client, 39 MockWebMIDIAccessor::MockWebMIDIAccessor(blink::WebMIDIAccessorClient* client,
40 TestInterfaces* interfaces) 40 TestInterfaces* interfaces)
41 : client_(client), interfaces_(interfaces) { 41 : client_(client), interfaces_(interfaces) {
42 } 42 }
43 43
44 MockWebMIDIAccessor::~MockWebMIDIAccessor() { 44 MockWebMIDIAccessor::~MockWebMIDIAccessor() {
45 } 45 }
46 46
47 void MockWebMIDIAccessor::startSession() { 47 void MockWebMIDIAccessor::startSession() {
48 // Add a mock input and output port. 48 // Add a mock input and output port.
49 const bool active = true;
49 client_->didAddInputPort("MockInputID", 50 client_->didAddInputPort("MockInputID",
50 "MockInputManufacturer", 51 "MockInputManufacturer",
51 "MockInputName", 52 "MockInputName",
52 "MockInputVersion"); 53 "MockInputVersion",
54 active);
53 client_->didAddOutputPort("MockOutputID", 55 client_->didAddOutputPort("MockOutputID",
54 "MockOutputManufacturer", 56 "MockOutputManufacturer",
55 "MockOutputName", 57 "MockOutputName",
56 "MockOutputVersion"); 58 "MockOutputVersion",
59 active);
57 interfaces_->GetDelegate()->PostTask(new DidStartSessionTask( 60 interfaces_->GetDelegate()->PostTask(new DidStartSessionTask(
58 this, client_, interfaces_->GetTestRunner()->midiAccessorResult())); 61 this, client_, interfaces_->GetTestRunner()->midiAccessorResult()));
59 } 62 }
60 63
61 } // namespace content 64 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698