Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(203)

Side by Side Diff: chrome/browser/debugger/debugger_wrapper.cc

Issue 6356015: DevTools: enable remote debugging with front-end served from the cloud. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Lint Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2006-2008 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.
4
5 #include "chrome/browser/debugger/debugger_wrapper.h"
6
7 #include "chrome/browser/debugger/devtools_http_protocol_handler.h"
8 #include "chrome/browser/debugger/debugger_remote_service.h"
9 #include "chrome/browser/debugger/devtools_protocol_handler.h"
10 #include "chrome/browser/debugger/devtools_remote_service.h"
11 #include "chrome/browser/debugger/extension_ports_remote_service.h"
12
13 DebuggerWrapper::DebuggerWrapper(int port, bool useHttp) {
14 if (port > 0) {
15 if (useHttp) {
16 http_handler_ = new DevToolsHttpProtocolHandler(port);
17 http_handler_->Start();
18 } else {
19 proto_handler_ = new DevToolsProtocolHandler(port);
20 proto_handler_->RegisterDestination(
21 new DevToolsRemoteService(proto_handler_),
22 DevToolsRemoteService::kToolName);
23 proto_handler_->RegisterDestination(
24 new DebuggerRemoteService(proto_handler_),
25 DebuggerRemoteService::kToolName);
26 proto_handler_->RegisterDestination(
27 new ExtensionPortsRemoteService(proto_handler_),
28 ExtensionPortsRemoteService::kToolName);
29 proto_handler_->Start();
30 }
31 }
32 }
33
34 DebuggerWrapper::~DebuggerWrapper() {
35 if (proto_handler_.get() != NULL)
36 proto_handler_->Stop();
37
38 if (http_handler_.get() != NULL)
39 http_handler_->Stop();
40 }
OLDNEW
« no previous file with comments | « chrome/browser/debugger/debugger_wrapper.h ('k') | chrome/browser/debugger/devtools_http_protocol_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698