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

Side by Side Diff: mojo/application_manager/application_manager.cc

Issue 638293005: ContentHandler::OnConnect: replace the |url| param with |requestor_url|. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « no previous file | mojo/apps/js/content_handler_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 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 "mojo/application_manager/application_manager.h" 5 #include "mojo/application_manager/application_manager.h"
6 6
7 #include <stdio.h> 7 #include <stdio.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 if (iter != url_to_content_handler_.end()) { 252 if (iter != url_to_content_handler_.end()) {
253 connection = iter->second; 253 connection = iter->second;
254 } else { 254 } else {
255 connection = new ContentHandlerConnection(this, content_handler_url); 255 connection = new ContentHandlerConnection(this, content_handler_url);
256 url_to_content_handler_[content_handler_url] = connection; 256 url_to_content_handler_[content_handler_url] = connection;
257 } 257 }
258 258
259 InterfaceRequest<ServiceProvider> spir; 259 InterfaceRequest<ServiceProvider> spir;
260 spir.Bind(service_provider.PassMessagePipe()); 260 spir.Bind(service_provider.PassMessagePipe());
261 connection->content_handler->OnConnect( 261 connection->content_handler->OnConnect(
262 content_url.spec(), url_response.Pass(), spir.Pass()); 262 requestor_url.spec(), url_response.Pass(), spir.Pass());
263 } 263 }
264 264
265 void ApplicationManager::SetLoaderForURL(scoped_ptr<ApplicationLoader> loader, 265 void ApplicationManager::SetLoaderForURL(scoped_ptr<ApplicationLoader> loader,
266 const GURL& url) { 266 const GURL& url) {
267 URLToLoaderMap::iterator it = url_to_loader_.find(url); 267 URLToLoaderMap::iterator it = url_to_loader_.find(url);
268 if (it != url_to_loader_.end()) 268 if (it != url_to_loader_.end())
269 delete it->second; 269 delete it->second;
270 url_to_loader_[url] = loader.release(); 270 url_to_loader_[url] = loader.release();
271 } 271 }
272 272
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 StubServiceProvider* stub_sp = new StubServiceProvider; 319 StubServiceProvider* stub_sp = new StubServiceProvider;
320 ServiceProviderPtr spp; 320 ServiceProviderPtr spp;
321 BindToProxy(stub_sp, &spp); 321 BindToProxy(stub_sp, &spp);
322 ConnectToApplication(application_url, GURL(), spp.Pass()); 322 ConnectToApplication(application_url, GURL(), spp.Pass());
323 MessagePipe pipe; 323 MessagePipe pipe;
324 stub_sp->GetRemoteServiceProvider()->ConnectToService(interface_name, 324 stub_sp->GetRemoteServiceProvider()->ConnectToService(interface_name,
325 pipe.handle1.Pass()); 325 pipe.handle1.Pass());
326 return pipe.handle0.Pass(); 326 return pipe.handle0.Pass();
327 } 327 }
328 } // namespace mojo 328 } // namespace mojo
OLDNEW
« no previous file with comments | « no previous file | mojo/apps/js/content_handler_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698