| 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 "components/devtools_service/devtools_service_delegate.h" | 5 #include "components/devtools_service/devtools_service_delegate.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "components/devtools_service/devtools_registry_impl.h" | 10 #include "components/devtools_service/devtools_registry_impl.h" |
| 11 #include "components/devtools_service/devtools_service.h" | 11 #include "components/devtools_service/devtools_service.h" |
| 12 #include "mojo/application/public/cpp/application_connection.h" | |
| 13 #include "mojo/application/public/cpp/application_impl.h" | |
| 14 #include "mojo/common/url_type_converters.h" | 12 #include "mojo/common/url_type_converters.h" |
| 13 #include "mojo/shell/public/cpp/application_connection.h" |
| 14 #include "mojo/shell/public/cpp/application_impl.h" |
| 15 #include "url/gurl.h" | 15 #include "url/gurl.h" |
| 16 | 16 |
| 17 namespace devtools_service { | 17 namespace devtools_service { |
| 18 | 18 |
| 19 namespace { | 19 namespace { |
| 20 | 20 |
| 21 bool IsShell(const GURL& requestor_url) { | 21 bool IsShell(const GURL& requestor_url) { |
| 22 // TODO(yzshen): http://crbug.com/491656 "mojo://shell/" has to be used | 22 // TODO(yzshen): http://crbug.com/491656 "mojo://shell/" has to be used |
| 23 // instead of "mojo:shell" because "mojo" is not treated as a standard scheme. | 23 // instead of "mojo:shell" because "mojo" is not treated as a standard scheme. |
| 24 return requestor_url == GURL("mojo://shell/"); | 24 return requestor_url == GURL("mojo://shell/"); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 service_->registry()->BindToRegistryRequest(std::move(request)); | 57 service_->registry()->BindToRegistryRequest(std::move(request)); |
| 58 } | 58 } |
| 59 | 59 |
| 60 void DevToolsServiceDelegate::Create( | 60 void DevToolsServiceDelegate::Create( |
| 61 mojo::ApplicationConnection* connection, | 61 mojo::ApplicationConnection* connection, |
| 62 mojo::InterfaceRequest<DevToolsCoordinator> request) { | 62 mojo::InterfaceRequest<DevToolsCoordinator> request) { |
| 63 service_->BindToCoordinatorRequest(std::move(request)); | 63 service_->BindToCoordinatorRequest(std::move(request)); |
| 64 } | 64 } |
| 65 | 65 |
| 66 } // namespace devtools_service | 66 } // namespace devtools_service |
| OLD | NEW |