OLD | NEW |
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 "mandoline/services/core_services/core_services_application_delegate.h" | 5 #include "mandoline/services/core_services/core_services_application_delegate.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/single_thread_task_runner.h" | 8 #include "base/single_thread_task_runner.h" |
9 #include "base/threading/platform_thread.h" | 9 #include "base/threading/platform_thread.h" |
10 #include "base/threading/simple_thread.h" | 10 #include "base/threading/simple_thread.h" |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 ApplicationThread* thread) { | 90 ApplicationThread* thread) { |
91 ScopedVector<ApplicationThread>::iterator iter = | 91 ScopedVector<ApplicationThread>::iterator iter = |
92 std::find(application_threads_.begin(), | 92 std::find(application_threads_.begin(), |
93 application_threads_.end(), | 93 application_threads_.end(), |
94 thread); | 94 thread); |
95 DCHECK(iter != application_threads_.end()); | 95 DCHECK(iter != application_threads_.end()); |
96 application_threads_.erase(iter); | 96 application_threads_.erase(iter); |
97 } | 97 } |
98 | 98 |
99 void CoreServicesApplicationDelegate::Initialize(mojo::ApplicationImpl* app) { | 99 void CoreServicesApplicationDelegate::Initialize(mojo::ApplicationImpl* app) { |
100 mojo::logging::InitLogging(); | 100 mojo::InitLogging(); |
101 tracing_.Initialize(app); | 101 tracing_.Initialize(app); |
102 } | 102 } |
103 | 103 |
104 bool CoreServicesApplicationDelegate::ConfigureIncomingConnection( | 104 bool CoreServicesApplicationDelegate::ConfigureIncomingConnection( |
105 mojo::ApplicationConnection* connection) { | 105 mojo::ApplicationConnection* connection) { |
106 connection->AddService(this); | 106 connection->AddService(this); |
107 return true; | 107 return true; |
108 } | 108 } |
109 | 109 |
110 void CoreServicesApplicationDelegate::Quit() { | 110 void CoreServicesApplicationDelegate::Quit() { |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 } | 148 } |
149 | 149 |
150 scoped_ptr<ApplicationThread> thread( | 150 scoped_ptr<ApplicationThread> thread( |
151 new ApplicationThread(weak_factory_.GetWeakPtr(), url, delegate.Pass(), | 151 new ApplicationThread(weak_factory_.GetWeakPtr(), url, delegate.Pass(), |
152 request.Pass(), destruct_callback)); | 152 request.Pass(), destruct_callback)); |
153 thread->Start(); | 153 thread->Start(); |
154 application_threads_.push_back(thread.Pass()); | 154 application_threads_.push_back(thread.Pass()); |
155 } | 155 } |
156 | 156 |
157 } // namespace core_services | 157 } // namespace core_services |
OLD | NEW |