| OLD | NEW |
| 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 "services/shell/shell.h" | 5 #include "services/shell/shell.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 if (source) { | 165 if (source) { |
| 166 request = GenerateCapabilityRequestForConnection( | 166 request = GenerateCapabilityRequestForConnection( |
| 167 source->capability_spec_, identity_, capability_spec_); | 167 source->capability_spec_, identity_, capability_spec_); |
| 168 source_id = source->id(); | 168 source_id = source->id(); |
| 169 } | 169 } |
| 170 | 170 |
| 171 // The target has specified that sources must request one of its provided | 171 // The target has specified that sources must request one of its provided |
| 172 // classes instead of specifying a wild-card for interfaces. | 172 // classes instead of specifying a wild-card for interfaces. |
| 173 if (HasClass(capability_spec_, kCapabilityClass_ExplicitClass) && | 173 if (HasClass(capability_spec_, kCapabilityClass_ExplicitClass) && |
| 174 (request.interfaces.count("*") != 0)) { | 174 (request.interfaces.count("*") != 0)) { |
| 175 request.interfaces = Interfaces(); | 175 request.interfaces.erase("*"); |
| 176 } | 176 } |
| 177 | 177 |
| 178 shell_client_->AcceptConnection( | 178 shell_client_->AcceptConnection( |
| 179 mojom::Identity::From(params->source()), source_id, | 179 mojom::Identity::From(params->source()), source_id, |
| 180 params->TakeRemoteInterfaces(), params->TakeLocalInterfaces(), | 180 params->TakeRemoteInterfaces(), params->TakeLocalInterfaces(), |
| 181 mojom::CapabilityRequest::From(request), params->target().name()); | 181 mojom::CapabilityRequest::From(request), params->target().name()); |
| 182 } | 182 } |
| 183 | 183 |
| 184 void StartWithClient(mojom::ShellClientPtr client) { | 184 void StartWithClient(mojom::ShellClientPtr client) { |
| 185 CHECK(!shell_client_); | 185 CHECK(!shell_client_); |
| (...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 780 void Shell::CleanupRunner(NativeRunner* runner) { | 780 void Shell::CleanupRunner(NativeRunner* runner) { |
| 781 for (auto it = native_runners_.begin(); it != native_runners_.end(); ++it) { | 781 for (auto it = native_runners_.begin(); it != native_runners_.end(); ++it) { |
| 782 if (it->get() == runner) { | 782 if (it->get() == runner) { |
| 783 native_runners_.erase(it); | 783 native_runners_.erase(it); |
| 784 return; | 784 return; |
| 785 } | 785 } |
| 786 } | 786 } |
| 787 } | 787 } |
| 788 | 788 |
| 789 } // namespace shell | 789 } // namespace shell |
| OLD | NEW |