Chromium Code Reviews| Index: components/html_viewer/devtools_agent_impl.h |
| diff --git a/components/html_viewer/devtools_agent_impl.h b/components/html_viewer/devtools_agent_impl.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..38d810293621b81e6d636eff0a1dd30ee0b82efc |
| --- /dev/null |
| +++ b/components/html_viewer/devtools_agent_impl.h |
| @@ -0,0 +1,56 @@ |
| +// Copyright 2015 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 COMPONENTS_HTML_VIEWER_DEVTOOLS_AGENT_IMPL_H_ |
| +#define COMPONENTS_HTML_VIEWER_DEVTOOLS_AGENT_IMPL_H_ |
| + |
| +#include "base/macros.h" |
| +#include "components/devtools_service/public/interfaces/devtools_service.mojom.h" |
| +#include "third_party/WebKit/public/web/WebDevToolsAgentClient.h" |
| +#include "third_party/mojo/src/mojo/public/cpp/bindings/binding.h" |
| + |
| +namespace blink { |
| +class WebLocalFrame; |
| +} |
| + |
| +namespace mojo { |
| +class Shell; |
| +} |
| + |
| +namespace html_viewer { |
| + |
| +class DevToolsAgentImpl : public devtools_service::DevToolsAgent, |
| + public blink::WebDevToolsAgentClient, |
|
dgozman
2015/06/03 09:55:55
Could you please add me to future patches which to
yzshen1
2015/06/05 17:29:29
Definitely!
I thought you might not be interested
|
| + public mojo::ErrorHandler { |
| + public: |
| + // |frame| must outlive this object. |
| + DevToolsAgentImpl(blink::WebLocalFrame* frame, mojo::Shell* shell); |
| + ~DevToolsAgentImpl() override; |
| + |
| + blink::WebLocalFrame* frame() const { return frame_; } |
| + |
| + private: |
| + // devtools_service::DevToolsAgent implementation. |
| + void SetClient(devtools_service::DevToolsAgentClientPtr client, |
| + const mojo::String& client_id) override; |
| + void DispatchProtocolMessage(const mojo::String& message) override; |
| + |
| + // blink::WebDevToolsAgentClient implementation. |
| + void sendProtocolMessage(int call_id, |
|
sky
2015/06/02 23:28:32
Because blink is in another repo we keep overrides
yzshen1
2015/06/05 17:29:29
Done.
|
| + const blink::WebString& response, |
| + const blink::WebString& state) override; |
| + |
| + // mojo::ErrorHandler implementation. |
| + void OnConnectionError() override; |
| + |
| + blink::WebLocalFrame* const frame_; |
| + mojo::Binding<DevToolsAgent> binding_; |
| + devtools_service::DevToolsAgentClientPtr client_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(DevToolsAgentImpl); |
| +}; |
| + |
| +} // namespace html_viewer |
| + |
| +#endif // COMPONENTS_HTML_VIEWER_DEVTOOLS_AGENT_IMPL_H_ |