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

Side by Side Diff: shell/context.cc

Issue 967563002: Rename sample_app -> spinning_cube. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Rebase. Created 5 years, 9 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 | « examples/surfaces_app/child_gl_impl.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "shell/context.h" 5 #include "shell/context.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/base_switches.h" 9 #include "base/base_switches.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 118
119 resolver->SetMojoBaseURL(base_url); 119 resolver->SetMojoBaseURL(base_url);
120 120
121 // The network service must be loaded from the filesystem. 121 // The network service must be loaded from the filesystem.
122 // This mapping is done before the command line URL mapping are processed, so 122 // This mapping is done before the command line URL mapping are processed, so
123 // that it can be overridden. 123 // that it can be overridden.
124 resolver->AddURLMapping( 124 resolver->AddURLMapping(
125 GURL("mojo:network_service"), 125 GURL("mojo:network_service"),
126 context->ResolveShellFileURL("file:network_service.mojo")); 126 context->ResolveShellFileURL("file:network_service.mojo"));
127 127
128 // Temporary mapping to avoid workflow breakages after app rename.
129 resolver->AddURLMapping(GURL("mojo:sample_app"), GURL("mojo:spinning_cube"));
130
128 // Command line URL mapping. 131 // Command line URL mapping.
129 std::vector<URLResolver::OriginMapping> origin_mappings = 132 std::vector<URLResolver::OriginMapping> origin_mappings =
130 URLResolver::GetOriginMappings(command_line->argv()); 133 URLResolver::GetOriginMappings(command_line->argv());
131 for (const auto& origin_mapping : origin_mappings) 134 for (const auto& origin_mapping : origin_mappings)
132 resolver->AddOriginMapping(GURL(origin_mapping.origin), 135 resolver->AddOriginMapping(GURL(origin_mapping.origin),
133 GURL(origin_mapping.base_url)); 136 GURL(origin_mapping.base_url));
134 137
135 if (command_line->HasSwitch(switches::kURLMappings)) { 138 if (command_line->HasSwitch(switches::kURLMappings)) {
136 const std::string mappings = 139 const std::string mappings =
137 command_line->GetSwitchValueASCII(switches::kURLMappings); 140 command_line->GetSwitchValueASCII(switches::kURLMappings);
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 ScopedMessagePipeHandle Context::ConnectToServiceByName( 324 ScopedMessagePipeHandle Context::ConnectToServiceByName(
322 const GURL& application_url, 325 const GURL& application_url,
323 const std::string& service_name) { 326 const std::string& service_name) {
324 app_urls_.insert(application_url); 327 app_urls_.insert(application_url);
325 return application_manager_.ConnectToServiceByName(application_url, 328 return application_manager_.ConnectToServiceByName(application_url,
326 service_name).Pass(); 329 service_name).Pass();
327 } 330 }
328 331
329 } // namespace shell 332 } // namespace shell
330 } // namespace mojo 333 } // namespace mojo
OLDNEW
« no previous file with comments | « examples/surfaces_app/child_gl_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698