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

Side by Side Diff: content/browser/debugger/devtools_browser_target.cc

Issue 11548032: Telemetry / Devtools TraceHandler: exposes tracing via dev tools. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: WIP! DONT SUBMIT. Created 8 years 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) 2012 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 "content/browser/debugger/devtools_browser_target.h"
6
7 namespace content {
8
9 DevToolsBrowserTarget::DevToolsBrowserTarget(int connection_id)
10 : connection_id_(connection_id) {
11 }
12
13 DevToolsBrowserTarget::~DevToolsBrowserTarget() {
14 }
15
16 int DevToolsBrowserTarget::connection_id() const {
pfeldman 2012/12/12 20:17:12 could live in .h
bulach 2012/12/13 17:36:23 Done.
17 return connection_id_;
18 }
19
20 void DevToolsBrowserTarget::RegisterHandler(Handler* handler) {
21 handlers_.push_back(handler);
pfeldman 2012/12/12 20:17:12 Make handlers a map? handlers_[handler->domain()]
bulach 2012/12/13 17:36:23 Done.
22 }
23
24 void DevToolsBrowserTarget::OnWebSocketMessage(int connection_id,
25 const std::string& data,
26 DevToolsServerSender* sender) {
27 for (ScopedVector<Handler>::iterator handler = handlers_.begin();
pfeldman 2012/12/12 20:17:12 // base::JSONReader::Read(data) into DictionaryVal
bulach 2012/12/13 17:36:23 Done.
28 handler != handlers_.end(); ++handler) {
29 if ((*handler)->OnWebSocketMessage(connection_id, data, sender)) {
pfeldman 2012/12/12 20:17:12 handler->OnProtocolCommand(const std::string& meth
bulach 2012/12/13 17:36:23 Done.
30 break;
31 }
32 }
33 }
34
35 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698