QUIC - cleanup changes to sync chromium tree with internal source.
[chromium-blink-merge.git] / components / devtools_service / devtools_service.cc
blob36a8309465ca44093bf8599f4445fa0f169b9021
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 "mojo/application/public/cpp/application_impl.h"
11 namespace devtools_service {
13 DevToolsService::DevToolsService(mojo::ApplicationImpl* application)
14 : application_(application), registry_(this) {
15 DCHECK(application_);
18 DevToolsService::~DevToolsService() {
21 void DevToolsService::BindToCoordinatorRequest(
22 mojo::InterfaceRequest<DevToolsCoordinator> request) {
23 coordinator_bindings_.AddBinding(this, request.Pass());
26 void DevToolsService::Initialize(uint16_t remote_debugging_port) {
27 if (http_server_) {
28 LOG(WARNING) << "DevTools service receives a "
29 << "DevToolsCoordinator.Initialize() call while it has "
30 << "already been initialized.";
31 return;
34 http_server_.reset(new DevToolsHttpServer(this, remote_debugging_port));
37 } // namespace devtools_service