| 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 "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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 public: | 197 public: |
| 198 TracingServiceProvider(Tracer* tracer, | 198 TracingServiceProvider(Tracer* tracer, |
| 199 mojo::InterfaceRequest<ServiceProvider> request) | 199 mojo::InterfaceRequest<ServiceProvider> request) |
| 200 : tracer_(tracer), binding_(this, request.Pass()) {} | 200 : tracer_(tracer), binding_(this, request.Pass()) {} |
| 201 ~TracingServiceProvider() override {} | 201 ~TracingServiceProvider() override {} |
| 202 | 202 |
| 203 void ConnectToService(const mojo::String& service_name, | 203 void ConnectToService(const mojo::String& service_name, |
| 204 mojo::ScopedMessagePipeHandle client_handle) override { | 204 mojo::ScopedMessagePipeHandle client_handle) override { |
| 205 if (tracer_ && service_name == tracing::TraceProvider::Name_) { | 205 if (tracer_ && service_name == tracing::TraceProvider::Name_) { |
| 206 tracer_->ConnectToProvider( | 206 tracer_->ConnectToProvider( |
| 207 mojo::MakeRequest<tracing::TraceProvider>(client_handle.Pass())); | 207 mojo::InterfaceRequest<tracing::TraceProvider>(client_handle.Pass())); |
| 208 } | 208 } |
| 209 } | 209 } |
| 210 | 210 |
| 211 private: | 211 private: |
| 212 Tracer* tracer_; | 212 Tracer* tracer_; |
| 213 mojo::StrongBinding<mojo::ServiceProvider> binding_; | 213 mojo::StrongBinding<mojo::ServiceProvider> binding_; |
| 214 | 214 |
| 215 DISALLOW_COPY_AND_ASSIGN(TracingServiceProvider); | 215 DISALLOW_COPY_AND_ASSIGN(TracingServiceProvider); |
| 216 }; | 216 }; |
| 217 | 217 |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 if (app_urls_.find(url) != app_urls_.end()) { | 387 if (app_urls_.find(url) != app_urls_.end()) { |
| 388 app_urls_.erase(url); | 388 app_urls_.erase(url); |
| 389 if (app_urls_.empty() && base::MessageLoop::current()->is_running()) { | 389 if (app_urls_.empty() && base::MessageLoop::current()->is_running()) { |
| 390 DCHECK(task_runners_->shell_runner()->RunsTasksOnCurrentThread()); | 390 DCHECK(task_runners_->shell_runner()->RunsTasksOnCurrentThread()); |
| 391 base::MessageLoop::current()->Quit(); | 391 base::MessageLoop::current()->Quit(); |
| 392 } | 392 } |
| 393 } | 393 } |
| 394 } | 394 } |
| 395 | 395 |
| 396 } // namespace shell | 396 } // namespace shell |
| OLD | NEW |