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

Side by Side Diff: mojo/shell/dynamic_service_loader.cc

Issue 213313004: Add creation of ServiceManager to Content (2nd try) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add shell_client to mojo_pepper_container_app Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « mojo/shell/dynamic_service_loader.h ('k') | no next file » | 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/shell/dynamic_service_loader.h" 5 #include "mojo/shell/dynamic_service_loader.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "mojo/shell/context.h" 9 #include "mojo/shell/context.h"
10 #include "mojo/shell/keep_alive.h" 10 #include "mojo/shell/keep_alive.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 } 98 }
99 99
100 void DynamicServiceLoader::LoadService(ServiceManager* manager, 100 void DynamicServiceLoader::LoadService(ServiceManager* manager,
101 const GURL& url, 101 const GURL& url,
102 ScopedShellHandle service_handle) { 102 ScopedShellHandle service_handle) {
103 DCHECK(url_to_load_context_.find(url) == url_to_load_context_.end()); 103 DCHECK(url_to_load_context_.find(url) == url_to_load_context_.end());
104 url_to_load_context_[url] = new LoadContext( 104 url_to_load_context_[url] = new LoadContext(
105 this, url, service_handle.Pass(), runner_factory_->Create(context_)); 105 this, url, service_handle.Pass(), runner_factory_->Create(context_));
106 } 106 }
107 107
108 void DynamicServiceLoader::OnServiceError(ServiceManager* manager,
109 const GURL& url) {
110 }
111
108 void DynamicServiceLoader::AppCompleted(const GURL& url) { 112 void DynamicServiceLoader::AppCompleted(const GURL& url) {
109 DCHECK(context_->task_runners()->ui_runner()->BelongsToCurrentThread()); 113 DCHECK(context_->task_runners()->ui_runner()->BelongsToCurrentThread());
110 DVLOG(2) << "App completed (url: " << url << ")"; 114 DVLOG(2) << "App completed (url: " << url << ")";
111 115
112 LoadContextMap::iterator it = url_to_load_context_.find(url); 116 LoadContextMap::iterator it = url_to_load_context_.find(url);
113 DCHECK(it != url_to_load_context_.end()) << url; 117 DCHECK(it != url_to_load_context_.end()) << url;
114 118
115 LoadContext* doomed = it->second; 119 LoadContext* doomed = it->second;
116 url_to_load_context_.erase(it); 120 url_to_load_context_.erase(it);
117 121
118 delete doomed; 122 delete doomed;
119 } 123 }
120 124
121 } // namespace shell 125 } // namespace shell
122 } // namespace mojo 126 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/shell/dynamic_service_loader.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698