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

Side by Side Diff: mojo/shell/package_manager/package_manager_impl.cc

Issue 1675153002: ApplicationImpl->ShellConnection, mojom::Application->mojom::ShellClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ci2
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 | « mojo/shell/package_manager/package_manager_impl.h ('k') | mojo/shell/public/cpp/BUILD.gn » ('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 "mojo/shell/package_manager/package_manager_impl.h" 5 #include "mojo/shell/package_manager/package_manager_impl.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 // TODO(beng): this is eff'n weird. 174 // TODO(beng): this is eff'n weird.
175 new NetworkFetcher(disable_cache_, std::move(request), 175 new NetworkFetcher(disable_cache_, std::move(request),
176 url_loader_factory_.get(), loader_callback); 176 url_loader_factory_.get(), loader_callback);
177 } 177 }
178 178
179 uint32_t PackageManagerImpl::HandleWithContentHandler( 179 uint32_t PackageManagerImpl::HandleWithContentHandler(
180 Fetcher* fetcher, 180 Fetcher* fetcher,
181 const Identity& source, 181 const Identity& source,
182 const GURL& target_url, 182 const GURL& target_url,
183 const CapabilityFilter& target_filter, 183 const CapabilityFilter& target_filter,
184 InterfaceRequest<mojom::Application>* application_request) { 184 InterfaceRequest<mojom::ShellClient>* request) {
185 Identity content_handler_identity; 185 Identity content_handler_identity;
186 URLResponsePtr response; 186 URLResponsePtr response;
187 if (ShouldHandleWithContentHandler(fetcher, 187 if (ShouldHandleWithContentHandler(fetcher,
188 target_url, 188 target_url,
189 target_filter, 189 target_filter,
190 &content_handler_identity, 190 &content_handler_identity,
191 &response)) { 191 &response)) {
192 ContentHandlerConnection* connection = 192 ContentHandlerConnection* connection =
193 GetContentHandler(content_handler_identity, source); 193 GetContentHandler(content_handler_identity, source);
194 connection->StartApplication(std::move(*application_request), 194 connection->StartApplication(std::move(*request), std::move(response));
195 std::move(response));
196 return connection->id(); 195 return connection->id();
197 } 196 }
198 return mojom::Shell::kInvalidApplicationID; 197 return mojom::Shell::kInvalidApplicationID;
199 } 198 }
200 199
201 bool PackageManagerImpl::IsURLInCatalog(const std::string& url) const { 200 bool PackageManagerImpl::IsURLInCatalog(const std::string& url) const {
202 return catalog_.find(url) != catalog_.end(); 201 return catalog_.find(url) != catalog_.end();
203 } 202 }
204 203
205 std::string PackageManagerImpl::GetApplicationName( 204 std::string PackageManagerImpl::GetApplicationName(
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 return; 381 return;
383 382
384 base::DictionaryValue* dictionary = nullptr; 383 base::DictionaryValue* dictionary = nullptr;
385 CHECK(manifest->GetAsDictionary(&dictionary)); 384 CHECK(manifest->GetAsDictionary(&dictionary));
386 DeserializeApplication(dictionary); 385 DeserializeApplication(dictionary);
387 SerializeCatalog(); 386 SerializeCatalog();
388 } 387 }
389 388
390 } // namespace shell 389 } // namespace shell
391 } // namespace mojo 390 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/shell/package_manager/package_manager_impl.h ('k') | mojo/shell/public/cpp/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698