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

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

Issue 1408363004: [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 call_id, 41 void sendProtocolMessage(int session_id,
42 int call_id,
42 const blink::WebString& response, 43 const blink::WebString& response,
43 const blink::WebString& state); 44 const blink::WebString& state);
44 45
45 void OnConnectionError(); 46 void OnConnectionError();
46 47
47 blink::WebLocalFrame* const frame_; 48 blink::WebLocalFrame* const frame_;
48 const std::string id_; 49 const std::string id_;
49 50
50 mojo::Binding<DevToolsAgent> binding_; 51 mojo::Binding<DevToolsAgent> binding_;
51 devtools_service::DevToolsAgentClientPtr client_; 52 devtools_service::DevToolsAgentClientPtr client_;
52 53
53 // If we restore the agent's internal state using serialized state data from a 54 // If we restore the agent's internal state using serialized state data from a
54 // previous agent, the agent may generate messages before |client_| is set. 55 // previous agent, the agent may generate messages before |client_| is set.
55 // In that case, we need to cache messages for the client. 56 // In that case, we need to cache messages for the client.
56 bool cache_until_client_ready_; 57 bool cache_until_client_ready_;
57 58
58 struct CachedClientMessage { 59 struct CachedClientMessage {
59 int call_id; 60 int call_id;
60 mojo::String response; 61 mojo::String response;
61 mojo::String state; 62 mojo::String state;
62 }; 63 };
63 std::vector<CachedClientMessage> cached_client_messages_; 64 std::vector<CachedClientMessage> cached_client_messages_;
64 65
65 DISALLOW_COPY_AND_ASSIGN(DevToolsAgentImpl); 66 DISALLOW_COPY_AND_ASSIGN(DevToolsAgentImpl);
66 }; 67 };
67 68
68 } // namespace html_viewer 69 } // namespace html_viewer
69 70
70 #endif // COMPONENTS_HTML_VIEWER_DEVTOOLS_AGENT_IMPL_H_ 71 #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