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

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

Issue 2589663003: mojo:: Rename mojo::GetProxy() to mojo::MakeRequest() (Closed)
Patch Set: Rebase Created 3 years, 12 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 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 "content/public/browser/content_browser_client.h" 10 #include "content/public/browser/content_browser_client.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 registry->AddInterface( 108 registry->AddInterface(
109 base::Bind(&ProvisionFetcherImpl::Create, context_getter)); 109 base::Bind(&ProvisionFetcherImpl::Create, context_getter));
110 #endif // defined(ENABLE_MOJO_CDM) 110 #endif // defined(ENABLE_MOJO_CDM)
111 GetContentClient()->browser()->ExposeInterfacesToMediaService( 111 GetContentClient()->browser()->ExposeInterfacesToMediaService(
112 registry.get(), render_frame_host_); 112 registry.get(), render_frame_host_);
113 113
114 // Get frame service InterfaceProvider. 114 // Get frame service InterfaceProvider.
115 // TODO(xhwang): Replace this InterfaceProvider with a dedicated media host 115 // TODO(xhwang): Replace this InterfaceProvider with a dedicated media host
116 // interface. See http://crbug.com/660573 116 // interface. See http://crbug.com/660573
117 service_manager::mojom::InterfaceProviderPtr interfaces; 117 service_manager::mojom::InterfaceProviderPtr interfaces;
118 registry->Bind(GetProxy(&interfaces), service_manager::Identity(), 118 registry->Bind(MakeRequest(&interfaces), service_manager::Identity(),
119 service_manager::InterfaceProviderSpec(), 119 service_manager::InterfaceProviderSpec(),
120 service_manager::Identity(), 120 service_manager::Identity(),
121 service_manager::InterfaceProviderSpec()); 121 service_manager::InterfaceProviderSpec());
122 media_registries_.push_back(std::move(registry)); 122 media_registries_.push_back(std::move(registry));
123 123
124 // TODO(slan): Use the BrowserContext Connector instead. See crbug.com/638950. 124 // TODO(slan): Use the BrowserContext Connector instead. See crbug.com/638950.
125 media::mojom::MediaServicePtr media_service; 125 media::mojom::MediaServicePtr media_service;
126 service_manager::Connector* connector = 126 service_manager::Connector* connector =
127 ServiceManagerConnection::GetForProcess()->GetConnector(); 127 ServiceManagerConnection::GetForProcess()->GetConnector();
128 connector->ConnectToInterface("media", &media_service); 128 connector->ConnectToInterface("media", &media_service);
129 media_service->CreateInterfaceFactory(GetProxy(&interface_factory_ptr_), 129 media_service->CreateInterfaceFactory(MakeRequest(&interface_factory_ptr_),
130 std::move(interfaces)); 130 std::move(interfaces));
131 interface_factory_ptr_.set_connection_error_handler(base::Bind( 131 interface_factory_ptr_.set_connection_error_handler(base::Bind(
132 &MediaInterfaceProxy::OnConnectionError, base::Unretained(this))); 132 &MediaInterfaceProxy::OnConnectionError, base::Unretained(this)));
133 } 133 }
134 134
135 } // namespace content 135 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/url_loader_factory_impl_unittest.cc ('k') | content/browser/memory/memory_coordinator_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698