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

Side by Side Diff: components/html_viewer/devtools_agent_impl.h

Issue 1163953002: html_viewer: Add DevToolsAgentImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Don't create DevToolsAgentImpl instance unless --remote-debugging-port is specified Created 5 years, 6 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
« no previous file with comments | « components/html_viewer/DEPS ('k') | components/html_viewer/devtools_agent_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 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 #ifndef COMPONENTS_HTML_VIEWER_DEVTOOLS_AGENT_IMPL_H_
6 #define COMPONENTS_HTML_VIEWER_DEVTOOLS_AGENT_IMPL_H_
7
8 #include "base/macros.h"
9 #include "components/devtools_service/public/interfaces/devtools_service.mojom.h "
10 #include "third_party/WebKit/public/web/WebDevToolsAgentClient.h"
11 #include "third_party/mojo/src/mojo/public/cpp/bindings/binding.h"
12
13 namespace blink {
14 class WebLocalFrame;
15 }
16
17 namespace mojo {
18 class Shell;
19 }
20
21 namespace html_viewer {
22
23 class DevToolsAgentImpl : public devtools_service::DevToolsAgent,
24 public blink::WebDevToolsAgentClient,
25 public mojo::ErrorHandler {
26 public:
27 // |frame| must outlive this object.
28 DevToolsAgentImpl(blink::WebLocalFrame* frame, mojo::Shell* shell);
29 ~DevToolsAgentImpl() override;
30
31 blink::WebLocalFrame* frame() const { return frame_; }
32
33 private:
34 // devtools_service::DevToolsAgent implementation.
35 void SetClient(devtools_service::DevToolsAgentClientPtr client,
36 const mojo::String& client_id) override;
37 void DispatchProtocolMessage(const mojo::String& message) override;
38
39 // blink::WebDevToolsAgentClient implementation.
40 void sendProtocolMessage(int call_id,
41 const blink::WebString& response,
42 const blink::WebString& state);
43
44 // mojo::ErrorHandler implementation.
45 void OnConnectionError() override;
46
47 blink::WebLocalFrame* const frame_;
48 mojo::Binding<DevToolsAgent> binding_;
49 devtools_service::DevToolsAgentClientPtr client_;
50
51 DISALLOW_COPY_AND_ASSIGN(DevToolsAgentImpl);
52 };
53
54 } // namespace html_viewer
55
56 #endif // COMPONENTS_HTML_VIEWER_DEVTOOLS_AGENT_IMPL_H_
OLDNEW
« no previous file with comments | « components/html_viewer/DEPS ('k') | components/html_viewer/devtools_agent_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698