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

Side by Side Diff: content/browser/media/media_interface_proxy.cc

Issue 2617883002: Add a new BindInterface() method to Connector. (Closed)
Patch Set: . Created 3 years, 11 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 | « content/browser/browser_context.cc ('k') | content/child/blink_platform_impl.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/media_interface_proxy.h" 5 #include "content/browser/media/media_interface_proxy.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 registry->Bind(MakeRequest(&interfaces), service_manager::Identity(), 119 registry->Bind(MakeRequest(&interfaces), service_manager::Identity(),
120 service_manager::InterfaceProviderSpec(), 120 service_manager::InterfaceProviderSpec(),
121 service_manager::Identity(), 121 service_manager::Identity(),
122 service_manager::InterfaceProviderSpec()); 122 service_manager::InterfaceProviderSpec());
123 media_registries_.push_back(std::move(registry)); 123 media_registries_.push_back(std::move(registry));
124 124
125 // TODO(slan): Use the BrowserContext Connector instead. See crbug.com/638950. 125 // TODO(slan): Use the BrowserContext Connector instead. See crbug.com/638950.
126 media::mojom::MediaServicePtr media_service; 126 media::mojom::MediaServicePtr media_service;
127 service_manager::Connector* connector = 127 service_manager::Connector* connector =
128 ServiceManagerConnection::GetForProcess()->GetConnector(); 128 ServiceManagerConnection::GetForProcess()->GetConnector();
129 connector->ConnectToInterface("media", &media_service); 129 connector->BindInterface("media", &media_service);
130 media_service->CreateInterfaceFactory(MakeRequest(&interface_factory_ptr_), 130 media_service->CreateInterfaceFactory(MakeRequest(&interface_factory_ptr_),
131 std::move(interfaces)); 131 std::move(interfaces));
132 interface_factory_ptr_.set_connection_error_handler(base::Bind( 132 interface_factory_ptr_.set_connection_error_handler(base::Bind(
133 &MediaInterfaceProxy::OnConnectionError, base::Unretained(this))); 133 &MediaInterfaceProxy::OnConnectionError, base::Unretained(this)));
134 } 134 }
135 135
136 } // namespace content 136 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/browser_context.cc ('k') | content/child/blink_platform_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698