OLD | NEW |
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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 virtual Status NotifyEventListeners(const std::string& method, |
96 const base::DictionaryValue& params); | 96 const base::DictionaryValue& params); |
97 scoped_ptr<SyncWebSocket> socket_; | 97 scoped_ptr<SyncWebSocket> socket_; |
98 GURL url_; | 98 GURL url_; |
99 ParserFunc parser_func_; | 99 ParserFunc parser_func_; |
100 std::list<DevToolsEventListener*> listeners_; | 100 std::list<DevToolsEventListener*> listeners_; |
| 101 std::list<DevToolsEventListener*> listeners_for_on_connected_; |
101 typedef std::map<int, base::DictionaryValue*> ResponseMap; | 102 typedef std::map<int, base::DictionaryValue*> ResponseMap; |
102 ResponseMap cmd_response_map_; | 103 ResponseMap cmd_response_map_; |
103 bool connected_; | 104 bool connected_; |
104 int next_id_; | 105 int next_id_; |
105 | 106 |
106 DISALLOW_COPY_AND_ASSIGN(DevToolsClientImpl); | 107 DISALLOW_COPY_AND_ASSIGN(DevToolsClientImpl); |
107 }; | 108 }; |
108 | 109 |
109 namespace internal { | 110 namespace internal { |
110 | 111 |
111 bool ParseInspectorMessage( | 112 bool ParseInspectorMessage( |
112 const std::string& message, | 113 const std::string& message, |
113 int expected_id, | 114 int expected_id, |
114 InspectorMessageType* type, | 115 InspectorMessageType* type, |
115 InspectorEvent* event, | 116 InspectorEvent* event, |
116 InspectorCommandResponse* command_response); | 117 InspectorCommandResponse* command_response); |
117 | 118 |
118 } // namespace internal | 119 } // namespace internal |
119 | 120 |
120 #endif // CHROME_TEST_CHROMEDRIVER_DEVTOOLS_CLIENT_IMPL_H_ | 121 #endif // CHROME_TEST_CHROMEDRIVER_DEVTOOLS_CLIENT_IMPL_H_ |
OLD | NEW |