OLD | NEW |
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 "mojo/shell/service_manager.h" | 5 #include "mojo/shell/service_manager.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "mojo/public/bindings/allocation_scope.h" | 8 #include "mojo/public/bindings/allocation_scope.h" |
9 #include "mojo/public/bindings/error_handler.h" | 9 #include "mojo/public/bindings/error_handler.h" |
10 #include "mojo/public/bindings/remote_ptr.h" | 10 #include "mojo/public/bindings/remote_ptr.h" |
11 #include "mojom/shell.h" | |
12 | 11 |
13 namespace mojo { | 12 namespace mojo { |
14 namespace shell { | 13 namespace shell { |
15 | 14 |
16 class ServiceManager::ServiceFactory : public Shell, public ErrorHandler { | 15 class ServiceManager::ServiceFactory : public Shell, public ErrorHandler { |
17 public: | 16 public: |
18 ServiceFactory(ServiceManager* manager, const GURL& url) | 17 ServiceFactory(ServiceManager* manager, const GURL& url) |
19 : manager_(manager), | 18 : manager_(manager), |
20 url_(url) { | 19 url_(url) { |
21 InterfacePipe<Shell> pipe; | 20 InterfacePipe<Shell> pipe; |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 void ServiceManager::RemoveServiceFactory(ServiceFactory* service_factory) { | 97 void ServiceManager::RemoveServiceFactory(ServiceFactory* service_factory) { |
99 ServiceFactoryMap::iterator it = | 98 ServiceFactoryMap::iterator it = |
100 url_to_service_factory_.find(service_factory->url()); | 99 url_to_service_factory_.find(service_factory->url()); |
101 DCHECK(it != url_to_service_factory_.end()); | 100 DCHECK(it != url_to_service_factory_.end()); |
102 delete it->second; | 101 delete it->second; |
103 url_to_service_factory_.erase(it); | 102 url_to_service_factory_.erase(it); |
104 } | 103 } |
105 | 104 |
106 } // namespace shell | 105 } // namespace shell |
107 } // namespace mojo | 106 } // namespace mojo |
OLD | NEW |