Chromium Code Reviews| Index: content/browser/debugger/devtools_browser_target.h |
| diff --git a/content/browser/debugger/devtools_browser_target.h b/content/browser/debugger/devtools_browser_target.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..be377a4b2e0fd2c06c1843f883c23b2eceae6b9c |
| --- /dev/null |
| +++ b/content/browser/debugger/devtools_browser_target.h |
| @@ -0,0 +1,46 @@ |
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CONTENT_BROWSER_DEBUGGER_DEVTOOLS_BROWSER_TARGET_H_ |
| +#define CONTENT_BROWSER_DEBUGGER_DEVTOOLS_BROWSER_TARGET_H_ |
| + |
| +#include "base/memory/scoped_vector.h" |
| + |
| +namespace content { |
| + |
| +class DevToolsServerSender; |
| + |
| +// This class bridges DevTools remote debugging server with the trace |
| +// infrastructure. |
| +class DevToolsBrowserTarget { |
| + public: |
| + class Handler { |
| + public: |
| + virtual bool OnWebSocketMessage(int connection_id, |
|
pfeldman
2012/12/12 20:17:12
Value* OnProtocolCommand(const std::string& method
bulach
2012/12/13 17:36:23
Done.
|
| + const std::string& data, |
| + DevToolsServerSender* sender) = 0; |
| + |
| + }; |
| + |
| + explicit DevToolsBrowserTarget(int connection_id); |
| + ~DevToolsBrowserTarget(); |
| + |
| + int connection_id() const; |
| + void RegisterHandler(Handler* handler); |
|
pfeldman
2012/12/12 20:17:12
You should comment that it takes ownership.
bulach
2012/12/13 17:36:23
Done.
|
| + |
| + void OnWebSocketMessage(int connection_id, |
| + const std::string& data, |
| + DevToolsServerSender* sender); |
| + |
| + private: |
| + const int connection_id_; |
| + |
| + ScopedVector<Handler> handlers_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(DevToolsBrowserTarget); |
| +}; |
| + |
| +} // namespace content |
| + |
| +#endif // CONTENT_BROWSER_DEBUGGER_DEVTOOLS_BROWSER_TARGET_H_ |