Supervised user import: Listen for profile creation/deletion
[chromium-blink-merge.git] / content / browser / devtools / protocol / devtools_protocol_handler.h
blob70bd1f796e5ecfad5ed99c584931c0af8cb7de85
1 // Copyright 2014 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 #ifndef CONTENT_BROWSER_DEVTOOLS_PROTOCOL_DEVTOOLS_PROTOCOL_HANDLER_H_
6 #define CONTENT_BROWSER_DEVTOOLS_PROTOCOL_DEVTOOLS_PROTOCOL_HANDLER_H_
8 #include "content/browser/devtools/protocol/devtools_protocol_dispatcher.h"
10 namespace content {
12 class DevToolsProtocolHandler {
13 public:
14 using Response = DevToolsProtocolClient::Response;
15 using Notifier = base::Callback<void(const std::string& message)>;
17 explicit DevToolsProtocolHandler(const Notifier& notifier);
18 virtual ~DevToolsProtocolHandler();
20 scoped_ptr<base::DictionaryValue> ParseCommand(const std::string& message);
21 void HandleCommand(scoped_ptr<base::DictionaryValue> command);
22 bool HandleOptionalCommand(scoped_ptr<base::DictionaryValue> command);
24 DevToolsProtocolDispatcher* dispatcher() { return &dispatcher_; }
26 private:
27 DevToolsProtocolClient client_;
28 DevToolsProtocolDispatcher dispatcher_;
31 } // namespace content
33 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_DEVTOOLS_PROTOCOL_HANDLER_H_