[AndroidWebViewShell] Replace rebaseline script with a new version using test_runner.py
[chromium-blink-merge.git] / components / devtools_service / devtools_service.cc
blob6cc0ede5ec0a773f0878abc7f095baa54ed37f11
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
3 // found in the LICENSE file.
5 #include "components/devtools_service/devtools_service.h"
7 #include "base/logging.h"
8 #include "components/devtools_service/devtools_http_server.h"
9 #include "components/devtools_service/devtools_registry_impl.h"
10 #include "mojo/application/public/cpp/application_impl.h"
12 namespace devtools_service {
14 DevToolsService::DevToolsService(mojo::ApplicationImpl* application)
15 : application_(application) {
16 DCHECK(application_);
19 DevToolsService::~DevToolsService() {
22 void DevToolsService::BindToCoordinatorRequest(
23 mojo::InterfaceRequest<DevToolsCoordinator> request) {
24 coordinator_bindings_.AddBinding(this, request.Pass());
27 void DevToolsService::Initialize(uint16_t remote_debugging_port) {
28 if (IsInitialized()) {
29 LOG(WARNING) << "DevTools service receives a "
30 << "DevToolsCoordinator.Initialize() call while it has "
31 << "already been initialized.";
32 return;
35 http_server_.reset(new DevToolsHttpServer(this, remote_debugging_port));
36 registry_.reset(new DevToolsRegistryImpl(this));
39 } // namespace devtools_service