OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_SERVER_HTTP_HANDLER_H_ | 5 #ifndef CHROME_TEST_CHROMEDRIVER_SERVER_HTTP_HANDLER_H_ |
6 #define CHROME_TEST_CHROMEDRIVER_SERVER_HTTP_HANDLER_H_ | 6 #define CHROME_TEST_CHROMEDRIVER_SERVER_HTTP_HANDLER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 const HttpResponseSenderFunc& send_response_func); | 70 const HttpResponseSenderFunc& send_response_func); |
71 | 71 |
72 private: | 72 private: |
73 FRIEND_TEST_ALL_PREFIXES(HttpHandlerTest, HandleUnknownCommand); | 73 FRIEND_TEST_ALL_PREFIXES(HttpHandlerTest, HandleUnknownCommand); |
74 FRIEND_TEST_ALL_PREFIXES(HttpHandlerTest, HandleNewSession); | 74 FRIEND_TEST_ALL_PREFIXES(HttpHandlerTest, HandleNewSession); |
75 FRIEND_TEST_ALL_PREFIXES(HttpHandlerTest, HandleInvalidPost); | 75 FRIEND_TEST_ALL_PREFIXES(HttpHandlerTest, HandleInvalidPost); |
76 FRIEND_TEST_ALL_PREFIXES(HttpHandlerTest, HandleUnimplementedCommand); | 76 FRIEND_TEST_ALL_PREFIXES(HttpHandlerTest, HandleUnimplementedCommand); |
77 FRIEND_TEST_ALL_PREFIXES(HttpHandlerTest, HandleCommand); | 77 FRIEND_TEST_ALL_PREFIXES(HttpHandlerTest, HandleCommand); |
78 typedef std::vector<CommandMapping> CommandMap; | 78 typedef std::vector<CommandMapping> CommandMap; |
79 | 79 |
80 Command WrapToCommand(const SessionCommand& session_command); | 80 Command WrapToCommand(const char* name, |
81 Command WrapToCommand(const WindowCommand& window_command); | 81 const SessionCommand& session_command); |
82 Command WrapToCommand(const ElementCommand& element_command); | 82 Command WrapToCommand(const char* name, const WindowCommand& window_command); |
| 83 Command WrapToCommand(const char* name, |
| 84 const ElementCommand& element_command); |
83 void HandleCommand(const net::HttpServerRequestInfo& request, | 85 void HandleCommand(const net::HttpServerRequestInfo& request, |
84 const std::string& trimmed_path, | 86 const std::string& trimmed_path, |
85 const HttpResponseSenderFunc& send_response_func); | 87 const HttpResponseSenderFunc& send_response_func); |
86 void PrepareResponse(const std::string& trimmed_path, | 88 void PrepareResponse(const std::string& trimmed_path, |
87 const HttpResponseSenderFunc& send_response_func, | 89 const HttpResponseSenderFunc& send_response_func, |
88 const Status& status, | 90 const Status& status, |
89 scoped_ptr<base::Value> value, | 91 scoped_ptr<base::Value> value, |
90 const std::string& session_id); | 92 const std::string& session_id); |
91 scoped_ptr<net::HttpServerResponseInfo> PrepareResponseHelper( | 93 scoped_ptr<net::HttpServerResponseInfo> PrepareResponseHelper( |
92 const std::string& trimmed_path, | 94 const std::string& trimmed_path, |
(...skipping 23 matching lines...) Expand all Loading... |
116 | 118 |
117 bool MatchesCommand(const std::string& method, | 119 bool MatchesCommand(const std::string& method, |
118 const std::string& path, | 120 const std::string& path, |
119 const CommandMapping& command, | 121 const CommandMapping& command, |
120 std::string* session_id, | 122 std::string* session_id, |
121 base::DictionaryValue* out_params); | 123 base::DictionaryValue* out_params); |
122 | 124 |
123 } // namespace internal | 125 } // namespace internal |
124 | 126 |
125 #endif // CHROME_TEST_CHROMEDRIVER_SERVER_HTTP_HANDLER_H_ | 127 #endif // CHROME_TEST_CHROMEDRIVER_SERVER_HTTP_HANDLER_H_ |
OLD | NEW |