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

Side by Side Diff: chrome/test/chromedriver/devtools_client_impl.h

Issue 12230021: [chromedriver] Send all OnConnected before any OnEvent when connected. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments. Created 7 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/test/chromedriver/devtools_client_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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CHROME_TEST_CHROMEDRIVER_DEVTOOLS_CLIENT_IMPL_H_ 5 #ifndef CHROME_TEST_CHROMEDRIVER_DEVTOOLS_CLIENT_IMPL_H_
6 #define CHROME_TEST_CHROMEDRIVER_DEVTOOLS_CLIENT_IMPL_H_ 6 #define CHROME_TEST_CHROMEDRIVER_DEVTOOLS_CLIENT_IMPL_H_
7 7
8 #include <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 const base::DictionaryValue& params, 85 const base::DictionaryValue& params,
86 scoped_ptr<base::DictionaryValue>* result); 86 scoped_ptr<base::DictionaryValue>* result);
87 Status ReceiveCommandResponse( 87 Status ReceiveCommandResponse(
88 int command_id, 88 int command_id,
89 scoped_ptr<base::DictionaryValue>* result); 89 scoped_ptr<base::DictionaryValue>* result);
90 Status ReceiveNextMessage( 90 Status ReceiveNextMessage(
91 int expected_id, 91 int expected_id,
92 internal::InspectorMessageType* type, 92 internal::InspectorMessageType* type,
93 internal::InspectorEvent* event, 93 internal::InspectorEvent* event,
94 internal::InspectorCommandResponse* response); 94 internal::InspectorCommandResponse* response);
95 virtual Status NotifyEventListeners(const std::string& method, 95 bool HasReceivedCommandResponse(int cmd_id);
96 const base::DictionaryValue& params); 96 Status NotifyEventListeners(const std::string& method,
97 const base::DictionaryValue& params);
97 scoped_ptr<SyncWebSocket> socket_; 98 scoped_ptr<SyncWebSocket> socket_;
98 GURL url_; 99 GURL url_;
99 ParserFunc parser_func_; 100 ParserFunc parser_func_;
100 std::list<DevToolsEventListener*> listeners_; 101 std::list<DevToolsEventListener*> listeners_;
102 std::list<DevToolsEventListener*> listeners_for_on_connected_;
101 typedef std::map<int, base::DictionaryValue*> ResponseMap; 103 typedef std::map<int, base::DictionaryValue*> ResponseMap;
102 ResponseMap cmd_response_map_; 104 ResponseMap cmd_response_map_;
103 bool connected_; 105 bool connected_;
104 int next_id_; 106 int next_id_;
105 107
106 DISALLOW_COPY_AND_ASSIGN(DevToolsClientImpl); 108 DISALLOW_COPY_AND_ASSIGN(DevToolsClientImpl);
107 }; 109 };
108 110
109 namespace internal { 111 namespace internal {
110 112
111 bool ParseInspectorMessage( 113 bool ParseInspectorMessage(
112 const std::string& message, 114 const std::string& message,
113 int expected_id, 115 int expected_id,
114 InspectorMessageType* type, 116 InspectorMessageType* type,
115 InspectorEvent* event, 117 InspectorEvent* event,
116 InspectorCommandResponse* command_response); 118 InspectorCommandResponse* command_response);
117 119
118 } // namespace internal 120 } // namespace internal
119 121
120 #endif // CHROME_TEST_CHROMEDRIVER_DEVTOOLS_CLIENT_IMPL_H_ 122 #endif // CHROME_TEST_CHROMEDRIVER_DEVTOOLS_CLIENT_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/test/chromedriver/devtools_client_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698