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

Side by Side Diff: media/mojo/services/media_apptest.cc

Issue 1681813002: Rename Connection::AddService/ConnectToService to Connection::AddInterface/GetInterface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@interface_binder
Patch Set: . Created 4 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 | « mash/wm/window_manager_application.cc ('k') | media/mojo/services/mojo_media_application.cc » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 <stdint.h> 5 #include <stdint.h>
6 #include <utility> 6 #include <utility>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 video_demuxer_stream_(DemuxerStream::VIDEO) {} 56 video_demuxer_stream_(DemuxerStream::VIDEO) {}
57 ~MediaAppTest() override {} 57 ~MediaAppTest() override {}
58 58
59 void SetUp() override { 59 void SetUp() override {
60 ApplicationTestBase::SetUp(); 60 ApplicationTestBase::SetUp();
61 61
62 connection_ = shell()->Connect("mojo:media"); 62 connection_ = shell()->Connect("mojo:media");
63 connection_->SetRemoteServiceProviderConnectionErrorHandler( 63 connection_->SetRemoteServiceProviderConnectionErrorHandler(
64 base::Bind(&MediaAppTest::ConnectionClosed, base::Unretained(this))); 64 base::Bind(&MediaAppTest::ConnectionClosed, base::Unretained(this)));
65 65
66 connection_->ConnectToService(&service_factory_); 66 connection_->GetInterface(&service_factory_);
67 service_factory_->CreateCdm(mojo::GetProxy(&cdm_)); 67 service_factory_->CreateCdm(mojo::GetProxy(&cdm_));
68 service_factory_->CreateRenderer(mojo::GetProxy(&renderer_)); 68 service_factory_->CreateRenderer(mojo::GetProxy(&renderer_));
69 69
70 run_loop_.reset(new base::RunLoop()); 70 run_loop_.reset(new base::RunLoop());
71 } 71 }
72 72
73 // MOCK_METHOD* doesn't support move only types. Work around this by having 73 // MOCK_METHOD* doesn't support move only types. Work around this by having
74 // an extra method. 74 // an extra method.
75 MOCK_METHOD2(OnCdmInitializedInternal, void(bool result, int cdm_id)); 75 MOCK_METHOD2(OnCdmInitializedInternal, void(bool result, int cdm_id));
76 void OnCdmInitialized(interfaces::CdmPromiseResultPtr result, 76 void OnCdmInitialized(interfaces::CdmPromiseResultPtr result,
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 // close the connection. 162 // close the connection.
163 EXPECT_CALL(*this, ConnectionClosed()) 163 EXPECT_CALL(*this, ConnectionClosed())
164 .Times(Exactly(1)) 164 .Times(Exactly(1))
165 .WillOnce(Invoke(run_loop_.get(), &base::RunLoop::Quit)); 165 .WillOnce(Invoke(run_loop_.get(), &base::RunLoop::Quit));
166 service_factory_.reset(); 166 service_factory_.reset();
167 167
168 run_loop_->Run(); 168 run_loop_->Run();
169 } 169 }
170 170
171 } // namespace media 171 } // namespace media
OLDNEW
« no previous file with comments | « mash/wm/window_manager_application.cc ('k') | media/mojo/services/mojo_media_application.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698