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 "shell/application_manager/application_manager.h" | 5 #include "shell/application_manager/application_manager.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "base/stl_util.h" | 11 #include "base/stl_util.h" |
12 #include "base/strings/string_util.h" | 12 #include "base/strings/string_util.h" |
13 #include "base/trace_event/trace_event.h" | 13 #include "base/trace_event/trace_event.h" |
14 #include "mojo/public/cpp/bindings/binding.h" | 14 #include "mojo/public/cpp/bindings/binding.h" |
15 #include "mojo/public/cpp/bindings/error_handler.h" | 15 #include "mojo/public/cpp/bindings/error_handler.h" |
16 #include "mojo/services/content_handler/public/interfaces/content_handler.mojom.
h" | 16 #include "mojo/services/content_handler/public/interfaces/content_handler.mojom.
h" |
17 #include "shell/application_manager/fetcher.h" | 17 #include "shell/application_manager/fetcher.h" |
18 #include "shell/application_manager/local_fetcher.h" | 18 #include "shell/application_manager/local_fetcher.h" |
19 #include "shell/application_manager/network_fetcher.h" | 19 #include "shell/application_manager/network_fetcher.h" |
20 #include "shell/application_manager/query_util.h" | 20 #include "shell/application_manager/query_util.h" |
21 #include "shell/application_manager/shell_impl.h" | 21 #include "shell/application_manager/shell_impl.h" |
22 #include "shell/switches.h" | |
23 | 22 |
24 using mojo::Application; | 23 using mojo::Application; |
25 using mojo::ApplicationPtr; | 24 using mojo::ApplicationPtr; |
26 using mojo::InterfaceRequest; | 25 using mojo::InterfaceRequest; |
27 using mojo::ServiceProvider; | 26 using mojo::ServiceProvider; |
28 using mojo::ServiceProviderPtr; | 27 using mojo::ServiceProviderPtr; |
29 | 28 |
30 namespace shell { | 29 namespace shell { |
31 | 30 |
32 namespace { | 31 namespace { |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 bool ApplicationManager::TestAPI::HasCreatedInstance() { | 89 bool ApplicationManager::TestAPI::HasCreatedInstance() { |
91 return has_created_instance; | 90 return has_created_instance; |
92 } | 91 } |
93 | 92 |
94 bool ApplicationManager::TestAPI::HasFactoryForURL(const GURL& url) const { | 93 bool ApplicationManager::TestAPI::HasFactoryForURL(const GURL& url) const { |
95 return manager_->identity_to_shell_impl_.find(Identity(url)) != | 94 return manager_->identity_to_shell_impl_.find(Identity(url)) != |
96 manager_->identity_to_shell_impl_.end(); | 95 manager_->identity_to_shell_impl_.end(); |
97 } | 96 } |
98 | 97 |
99 ApplicationManager::ApplicationManager(Delegate* delegate) | 98 ApplicationManager::ApplicationManager(Delegate* delegate) |
100 : delegate_(delegate), weak_ptr_factory_(this) { | 99 : delegate_(delegate), |
| 100 blocking_pool_(nullptr), |
| 101 disable_cache_(false), |
| 102 weak_ptr_factory_(this) { |
101 } | 103 } |
102 | 104 |
103 ApplicationManager::~ApplicationManager() { | 105 ApplicationManager::~ApplicationManager() { |
104 STLDeleteValues(&url_to_content_handler_); | 106 STLDeleteValues(&url_to_content_handler_); |
105 TerminateShellConnections(); | 107 TerminateShellConnections(); |
106 STLDeleteValues(&url_to_loader_); | 108 STLDeleteValues(&url_to_loader_); |
107 STLDeleteValues(&scheme_to_loader_); | 109 STLDeleteValues(&scheme_to_loader_); |
108 } | 110 } |
109 | 111 |
110 void ApplicationManager::TerminateShellConnections() { | 112 void ApplicationManager::TerminateShellConnections() { |
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
489 return args_it->second; | 491 return args_it->second; |
490 return std::vector<std::string>(); | 492 return std::vector<std::string>(); |
491 } | 493 } |
492 | 494 |
493 void ApplicationManager::CleanupRunner(NativeRunner* runner) { | 495 void ApplicationManager::CleanupRunner(NativeRunner* runner) { |
494 native_runners_.erase( | 496 native_runners_.erase( |
495 std::find(native_runners_.begin(), native_runners_.end(), runner)); | 497 std::find(native_runners_.begin(), native_runners_.end(), runner)); |
496 } | 498 } |
497 | 499 |
498 } // namespace shell | 500 } // namespace shell |
OLD | NEW |