| # Copyright 2021 The Cobalt Authors. All Rights Reserved. |
| # |
| # Licensed under the Apache License, Version 2.0 (the "License"); |
| # you may not use this file except in compliance with the License. |
| # You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| |
| config("webdriver_public_config") { |
| defines = [ "ENABLE_WEBDRIVER" ] |
| } |
| |
| static_library("webdriver") { |
| configs -= [ "//starboard/build/config:size" ] |
| configs += [ "//starboard/build/config:speed" ] |
| |
| deps = [ |
| "//base", |
| "//base:i18n", |
| "//cobalt/base", |
| "//cobalt/cssom", |
| "//cobalt/dom", |
| "//cobalt/loader", |
| "//cobalt/math", |
| "//cobalt/script", |
| "//net", |
| "//net:http_server", |
| "//third_party/icu:icuuc", |
| "//url", |
| ] |
| if (is_gold) { |
| sources = [ "stub_web_driver_module.cc" ] |
| } else { |
| sources = [ |
| "algorithms.cc", |
| "algorithms.h", |
| "dispatcher.cc", |
| "dispatcher.h", |
| "element_driver.cc", |
| "element_driver.h", |
| "keyboard.cc", |
| "keyboard.h", |
| "protocol/button.cc", |
| "protocol/button.h", |
| "protocol/capabilities.cc", |
| "protocol/capabilities.h", |
| "protocol/cookie.cc", |
| "protocol/cookie.h", |
| "protocol/element_id.cc", |
| "protocol/element_id.h", |
| "protocol/frame_id.cc", |
| "protocol/frame_id.h", |
| "protocol/keys.cc", |
| "protocol/keys.h", |
| "protocol/location.cc", |
| "protocol/location.h", |
| "protocol/log_entry.cc", |
| "protocol/log_entry.h", |
| "protocol/log_type.cc", |
| "protocol/log_type.h", |
| "protocol/moveto.cc", |
| "protocol/moveto.h", |
| "protocol/proxy.cc", |
| "protocol/proxy.h", |
| "protocol/rect.cc", |
| "protocol/rect.h", |
| "protocol/response.cc", |
| "protocol/response.h", |
| "protocol/script.cc", |
| "protocol/script.h", |
| "protocol/search_strategy.cc", |
| "protocol/search_strategy.h", |
| "protocol/server_status.cc", |
| "protocol/server_status.h", |
| "protocol/session_id.h", |
| "protocol/size.cc", |
| "protocol/size.h", |
| "protocol/window_id.cc", |
| "protocol/window_id.h", |
| "screencast/screencast_module.cc", |
| "screencast/screencast_module.h", |
| "screenshot.cc", |
| "screenshot.h", |
| "script_executor.cc", |
| "script_executor.h", |
| "script_executor_params.cc", |
| "script_executor_params.h", |
| "script_executor_result.h", |
| "search.cc", |
| "search.h", |
| "server.cc", |
| "server.h", |
| "session_driver.cc", |
| "session_driver.h", |
| "web_driver_module.cc", |
| "web_driver_module.h", |
| "window_driver.cc", |
| "window_driver.h", |
| ] |
| deps += [ ":copy_webdriver_data" ] |
| public_configs = [ ":webdriver_public_config" ] |
| } |
| } |
| |
| # TODO: This declares content_deploy_subdirs which should be migrated for |
| # install targets. |
| copy("copy_webdriver_data") { |
| sources = [ "content/webdriver-init.js" ] |
| outputs = |
| [ "$sb_static_contents_output_data_dir/webdriver/webdriver-init.js" ] |
| } |