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_CHROME_DEVTOOLS_CLIENT_IMPL_H_ | 5 #ifndef CHROME_TEST_CHROMEDRIVER_CHROME_DEVTOOLS_CLIENT_IMPL_H_ |
6 #define CHROME_TEST_CHROMEDRIVER_CHROME_DEVTOOLS_CLIENT_IMPL_H_ | 6 #define CHROME_TEST_CHROMEDRIVER_CHROME_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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 const std::string& url, | 74 const std::string& url, |
75 const std::string& id, | 75 const std::string& id, |
76 const FrontendCloserFunc& frontend_closer_func, | 76 const FrontendCloserFunc& frontend_closer_func, |
77 const ParserFunc& parser_func); | 77 const ParserFunc& parser_func); |
78 | 78 |
79 virtual ~DevToolsClientImpl(); | 79 virtual ~DevToolsClientImpl(); |
80 | 80 |
81 void SetParserFuncForTesting(const ParserFunc& parser_func); | 81 void SetParserFuncForTesting(const ParserFunc& parser_func); |
82 | 82 |
83 // Overridden from DevToolsClient: | 83 // Overridden from DevToolsClient: |
84 virtual const std::string& GetId() OVERRIDE; | 84 virtual const std::string& GetId() override; |
85 virtual bool WasCrashed() OVERRIDE; | 85 virtual bool WasCrashed() override; |
86 virtual Status ConnectIfNecessary() OVERRIDE; | 86 virtual Status ConnectIfNecessary() override; |
87 virtual Status SendCommand(const std::string& method, | 87 virtual Status SendCommand(const std::string& method, |
88 const base::DictionaryValue& params) OVERRIDE; | 88 const base::DictionaryValue& params) override; |
89 virtual Status SendCommandAndGetResult( | 89 virtual Status SendCommandAndGetResult( |
90 const std::string& method, | 90 const std::string& method, |
91 const base::DictionaryValue& params, | 91 const base::DictionaryValue& params, |
92 scoped_ptr<base::DictionaryValue>* result) OVERRIDE; | 92 scoped_ptr<base::DictionaryValue>* result) override; |
93 virtual void AddListener(DevToolsEventListener* listener) OVERRIDE; | 93 virtual void AddListener(DevToolsEventListener* listener) override; |
94 virtual Status HandleEventsUntil( | 94 virtual Status HandleEventsUntil( |
95 const ConditionalFunc& conditional_func, | 95 const ConditionalFunc& conditional_func, |
96 const base::TimeDelta& timeout) OVERRIDE; | 96 const base::TimeDelta& timeout) override; |
97 virtual Status HandleReceivedEvents() OVERRIDE; | 97 virtual Status HandleReceivedEvents() override; |
98 | 98 |
99 private: | 99 private: |
100 enum ResponseState { | 100 enum ResponseState { |
101 // The client is waiting for the response. | 101 // The client is waiting for the response. |
102 kWaiting, | 102 kWaiting, |
103 // The command response will not be received because it is blocked by an | 103 // The command response will not be received because it is blocked by an |
104 // alert that the command triggered. | 104 // alert that the command triggered. |
105 kBlocked, | 105 kBlocked, |
106 // The client no longer cares about the response. | 106 // The client no longer cares about the response. |
107 kIgnored, | 107 kIgnored, |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 bool ParseInspectorMessage( | 154 bool ParseInspectorMessage( |
155 const std::string& message, | 155 const std::string& message, |
156 int expected_id, | 156 int expected_id, |
157 InspectorMessageType* type, | 157 InspectorMessageType* type, |
158 InspectorEvent* event, | 158 InspectorEvent* event, |
159 InspectorCommandResponse* command_response); | 159 InspectorCommandResponse* command_response); |
160 | 160 |
161 } // namespace internal | 161 } // namespace internal |
162 | 162 |
163 #endif // CHROME_TEST_CHROMEDRIVER_CHROME_DEVTOOLS_CLIENT_IMPL_H_ | 163 #endif // CHROME_TEST_CHROMEDRIVER_CHROME_DEVTOOLS_CLIENT_IMPL_H_ |
OLD | NEW |