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

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

Issue 1437993003: Revert of [DevTools] Filter any messages from previous sessions in DevToolsAgentHostImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 | « no previous file | 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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_HTML_VIEWER_DEVTOOLS_AGENT_IMPL_H_ 5 #ifndef COMPONENTS_HTML_VIEWER_DEVTOOLS_AGENT_IMPL_H_
6 #define COMPONENTS_HTML_VIEWER_DEVTOOLS_AGENT_IMPL_H_ 6 #define COMPONENTS_HTML_VIEWER_DEVTOOLS_AGENT_IMPL_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 20 matching lines...) Expand all
31 ~DevToolsAgentImpl() override; 31 ~DevToolsAgentImpl() override;
32 32
33 void BindToRequest(mojo::InterfaceRequest<DevToolsAgent> request); 33 void BindToRequest(mojo::InterfaceRequest<DevToolsAgent> request);
34 34
35 private: 35 private:
36 // devtools_service::DevToolsAgent implementation. 36 // devtools_service::DevToolsAgent implementation.
37 void SetClient(devtools_service::DevToolsAgentClientPtr client) override; 37 void SetClient(devtools_service::DevToolsAgentClientPtr client) override;
38 void DispatchProtocolMessage(const mojo::String& message) override; 38 void DispatchProtocolMessage(const mojo::String& message) override;
39 39
40 // blink::WebDevToolsAgentClient implementation. 40 // blink::WebDevToolsAgentClient implementation.
41 void sendProtocolMessage(int session_id, 41 void sendProtocolMessage(int call_id,
42 int call_id,
43 const blink::WebString& response, 42 const blink::WebString& response,
44 const blink::WebString& state); 43 const blink::WebString& state);
45 44
46 void OnConnectionError(); 45 void OnConnectionError();
47 46
48 blink::WebLocalFrame* const frame_; 47 blink::WebLocalFrame* const frame_;
49 const std::string id_; 48 const std::string id_;
50 49
51 mojo::Binding<DevToolsAgent> binding_; 50 mojo::Binding<DevToolsAgent> binding_;
52 devtools_service::DevToolsAgentClientPtr client_; 51 devtools_service::DevToolsAgentClientPtr client_;
53 52
54 // If we restore the agent's internal state using serialized state data from a 53 // If we restore the agent's internal state using serialized state data from a
55 // previous agent, the agent may generate messages before |client_| is set. 54 // previous agent, the agent may generate messages before |client_| is set.
56 // In that case, we need to cache messages for the client. 55 // In that case, we need to cache messages for the client.
57 bool cache_until_client_ready_; 56 bool cache_until_client_ready_;
58 57
59 struct CachedClientMessage { 58 struct CachedClientMessage {
60 int call_id; 59 int call_id;
61 mojo::String response; 60 mojo::String response;
62 mojo::String state; 61 mojo::String state;
63 }; 62 };
64 std::vector<CachedClientMessage> cached_client_messages_; 63 std::vector<CachedClientMessage> cached_client_messages_;
65 64
66 DISALLOW_COPY_AND_ASSIGN(DevToolsAgentImpl); 65 DISALLOW_COPY_AND_ASSIGN(DevToolsAgentImpl);
67 }; 66 };
68 67
69 } // namespace html_viewer 68 } // namespace html_viewer
70 69
71 #endif // COMPONENTS_HTML_VIEWER_DEVTOOLS_AGENT_IMPL_H_ 70 #endif // COMPONENTS_HTML_VIEWER_DEVTOOLS_AGENT_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | components/html_viewer/devtools_agent_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698