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 #include "chrome/test/chromedriver/server/http_handler.h" | 5 #include "chrome/test/chromedriver/server/http_handler.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 #include <utility> | 10 #include <utility> |
(...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
604 base::Bind(&ExecuteIsAutoReporting))), | 604 base::Bind(&ExecuteIsAutoReporting))), |
605 CommandMapping(kPost, | 605 CommandMapping(kPost, |
606 "session/:sessionId/autoreport", | 606 "session/:sessionId/autoreport", |
607 WrapToCommand( | 607 WrapToCommand( |
608 "SetAutoReporting", | 608 "SetAutoReporting", |
609 base::Bind(&ExecuteSetAutoReporting))), | 609 base::Bind(&ExecuteSetAutoReporting))), |
610 CommandMapping(kPost, | 610 CommandMapping(kPost, |
611 "session/:sessionId/touch/pinch", | 611 "session/:sessionId/touch/pinch", |
612 WrapToCommand("TouchPinch", | 612 WrapToCommand("TouchPinch", |
613 base::Bind(&ExecuteTouchPinch))), | 613 base::Bind(&ExecuteTouchPinch))), |
| 614 CommandMapping(kPost, |
| 615 "session/:sessionId/chromium/sendcommand", |
| 616 WrapToCommand("ExecuteSendCommand", |
| 617 base::Bind(&ExecuteSendCommand))), |
| 618 CommandMapping( |
| 619 kPost, |
| 620 "session/:sessionId/chromium/sendcommandandgetresult", |
| 621 WrapToCommand("ExecuteSendCommandAndGetResult", |
| 622 base::Bind(&ExecuteSendCommandAndGetResult))), |
614 }; | 623 }; |
615 command_map_.reset( | 624 command_map_.reset( |
616 new CommandMap(commands, commands + arraysize(commands))); | 625 new CommandMap(commands, commands + arraysize(commands))); |
617 } | 626 } |
618 | 627 |
619 HttpHandler::~HttpHandler() {} | 628 HttpHandler::~HttpHandler() {} |
620 | 629 |
621 void HttpHandler::Handle(const net::HttpServerRequestInfo& request, | 630 void HttpHandler::Handle(const net::HttpServerRequestInfo& request, |
622 const HttpResponseSenderFunc& send_response_func) { | 631 const HttpResponseSenderFunc& send_response_func) { |
623 CHECK(thread_checker_.CalledOnValidThread()); | 632 CHECK(thread_checker_.CalledOnValidThread()); |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
903 params.SetString(name, decoded); | 912 params.SetString(name, decoded); |
904 } else if (command_path_parts[i] != path_parts[i]) { | 913 } else if (command_path_parts[i] != path_parts[i]) { |
905 return false; | 914 return false; |
906 } | 915 } |
907 } | 916 } |
908 out_params->MergeDictionary(¶ms); | 917 out_params->MergeDictionary(¶ms); |
909 return true; | 918 return true; |
910 } | 919 } |
911 | 920 |
912 } // namespace internal | 921 } // namespace internal |
OLD | NEW |