 Chromium Code Reviews
 Chromium Code Reviews Issue 2473073003:
  [headless] Refactor headless devtools client API.  (Closed)
    
  
    Issue 2473073003:
  [headless] Refactor headless devtools client API.  (Closed) 
  | OLD | NEW | 
|---|---|
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 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 import("//mojo/public/tools/bindings/mojom.gni") | 5 import("//mojo/public/tools/bindings/mojom.gni") | 
| 6 import("//testing/test.gni") | 6 import("//testing/test.gni") | 
| 7 import("//tools/grit/grit_rule.gni") | 7 import("//tools/grit/grit_rule.gni") | 
| 8 import("//tools/grit/repack.gni") | 8 import("//tools/grit/repack.gni") | 
| 9 | 9 | 
| 10 config("headless_implementation") { | 10 config("headless_implementation") { | 
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 52 } | 52 } | 
| 53 | 53 | 
| 54 grit("headless_lib_resources_grit") { | 54 grit("headless_lib_resources_grit") { | 
| 55 source = "lib/resources/headless_lib_resources.grd" | 55 source = "lib/resources/headless_lib_resources.grd" | 
| 56 outputs = [ | 56 outputs = [ | 
| 57 "grit/headless_lib_resources.h", | 57 "grit/headless_lib_resources.h", | 
| 58 "$root_gen_dir/headless/headless_lib_resources.pak", | 58 "$root_gen_dir/headless/headless_lib_resources.pak", | 
| 59 ] | 59 ] | 
| 60 } | 60 } | 
| 61 | 61 | 
| 62 generated_devtools_api = [ | 62 devtools_domains = [ | 
| 63 "$target_gen_dir/public/domains/accessibility.cc", | 63 "accessibility", | 
| 64 "$target_gen_dir/public/domains/accessibility.h", | 64 "animation", | 
| 65 "$target_gen_dir/public/domains/animation.cc", | 65 "application_cache", | 
| 66 "$target_gen_dir/public/domains/animation.h", | 66 "cache_storage", | 
| 67 "$target_gen_dir/public/domains/application_cache.cc", | 67 "console", | 
| 68 "$target_gen_dir/public/domains/application_cache.h", | 68 "css", | 
| 69 "$target_gen_dir/public/domains/cache_storage.cc", | 69 "database", | 
| 70 "$target_gen_dir/public/domains/cache_storage.h", | 70 "debugger", | 
| 71 "$target_gen_dir/public/domains/console.cc", | 71 "device_orientation", | 
| 72 "$target_gen_dir/public/domains/console.h", | 72 "dom", | 
| 73 "$target_gen_dir/public/domains/css.cc", | 73 "dom_debugger", | 
| 74 "$target_gen_dir/public/domains/css.h", | 74 "dom_storage", | 
| 75 "$target_gen_dir/public/domains/database.cc", | 75 "emulation", | 
| 76 "$target_gen_dir/public/domains/database.h", | 76 "heap_profiler", | 
| 77 "$target_gen_dir/public/domains/debugger.cc", | 77 "indexeddb", | 
| 78 "$target_gen_dir/public/domains/debugger.h", | 78 "input", | 
| 79 "$target_gen_dir/public/domains/device_orientation.cc", | 79 "inspector", | 
| 80 "$target_gen_dir/public/domains/device_orientation.h", | 80 "io", | 
| 81 "$target_gen_dir/public/domains/dom.cc", | 81 "layer_tree", | 
| 82 "$target_gen_dir/public/domains/dom.h", | 82 "log", | 
| 83 "$target_gen_dir/public/domains/dom_debugger.cc", | 83 "memory", | 
| 84 "$target_gen_dir/public/domains/dom_debugger.h", | 84 "network", | 
| 85 "$target_gen_dir/public/domains/dom_storage.cc", | 85 "page", | 
| 86 "$target_gen_dir/public/domains/dom_storage.h", | 86 "profiler", | 
| 87 "$target_gen_dir/public/domains/emulation.cc", | 87 "rendering", | 
| 88 "$target_gen_dir/public/domains/emulation.h", | 88 "runtime", | 
| 89 "$target_gen_dir/public/domains/heap_profiler.cc", | 89 "security", | 
| 90 "$target_gen_dir/public/domains/heap_profiler.h", | 90 "service_worker", | 
| 91 "$target_gen_dir/public/domains/indexeddb.cc", | 91 "target", | 
| 92 "$target_gen_dir/public/domains/indexeddb.h", | 92 "tracing", | 
| 93 "$target_gen_dir/public/domains/input.cc", | |
| 94 "$target_gen_dir/public/domains/input.h", | |
| 95 "$target_gen_dir/public/domains/inspector.cc", | |
| 96 "$target_gen_dir/public/domains/inspector.h", | |
| 97 "$target_gen_dir/public/domains/io.cc", | |
| 98 "$target_gen_dir/public/domains/io.h", | |
| 99 "$target_gen_dir/public/domains/layer_tree.cc", | |
| 100 "$target_gen_dir/public/domains/layer_tree.h", | |
| 101 "$target_gen_dir/public/domains/log.cc", | |
| 102 "$target_gen_dir/public/domains/log.h", | |
| 103 "$target_gen_dir/public/domains/memory.cc", | |
| 104 "$target_gen_dir/public/domains/memory.h", | |
| 105 "$target_gen_dir/public/domains/network.cc", | |
| 106 "$target_gen_dir/public/domains/network.h", | |
| 107 "$target_gen_dir/public/domains/page.cc", | |
| 108 "$target_gen_dir/public/domains/page.h", | |
| 109 "$target_gen_dir/public/domains/profiler.cc", | |
| 110 "$target_gen_dir/public/domains/profiler.h", | |
| 111 "$target_gen_dir/public/domains/rendering.cc", | |
| 112 "$target_gen_dir/public/domains/rendering.h", | |
| 113 "$target_gen_dir/public/domains/runtime.cc", | |
| 114 "$target_gen_dir/public/domains/runtime.h", | |
| 115 "$target_gen_dir/public/domains/security.cc", | |
| 116 "$target_gen_dir/public/domains/security.h", | |
| 117 "$target_gen_dir/public/domains/service_worker.cc", | |
| 118 "$target_gen_dir/public/domains/service_worker.h", | |
| 119 "$target_gen_dir/public/domains/target.cc", | |
| 120 "$target_gen_dir/public/domains/target.h", | |
| 121 "$target_gen_dir/public/domains/tracing.cc", | |
| 122 "$target_gen_dir/public/domains/tracing.h", | |
| 123 "$target_gen_dir/public/domains/type_conversions.h", | |
| 124 "$target_gen_dir/public/domains/types.cc", | |
| 125 "$target_gen_dir/public/domains/types.h", | |
| 126 ] | 93 ] | 
| 127 | 94 | 
| 95 generated_devtools_api = [ | |
| 96 "$target_gen_dir/public/domains/types.h", | |
| 97 "$target_gen_dir/public/domains/type_conversions.h", | |
| 98 ] | |
| 99 foreach(domain, devtools_domains) { | |
| 100 generated_devtools_api += [ | |
| 101 "$target_gen_dir/public/domains/" + domain + ".h", | |
| 102 "$target_gen_dir/public/devtools/domains/" + domain + ".cc", | |
| 103 "$target_gen_dir/public/devtools/domains/" + domain + ".h", | |
| 104 "$target_gen_dir/public/devtools/domains/types_" + domain + ".h", | |
| 105 "$target_gen_dir/public/devtools/domains/types_" + domain + ".cc", | |
| 106 "$target_gen_dir/public/devtools/internal/type_conversions" + domain + ".h", | |
| 
Sami
2016/11/04 17:42:10
Missing underscore before the quote?
 
altimin
2016/11/08 17:14:19
Done.
 | |
| 107 "$target_gen_dir/public/devtools/internal/" + | |
| 108 "types_forward_declarations_" + domain + ".h", | |
| 109 ] | |
| 110 } | |
| 111 | |
| 128 action("gen_devtools_client_api") { | 112 action("gen_devtools_client_api") { | 
| 129 script = "//headless/lib/browser/client_api_generator.py" | 113 script = "//headless/lib/browser/devtools_api/client_api_generator.py" | 
| 130 deps = [ | 114 deps = [ | 
| 131 "//third_party/WebKit/Source/core/inspector:protocol_version", | 115 "//third_party/WebKit/Source/core/inspector:protocol_version", | 
| 132 ] | 116 ] | 
| 133 inputs = [ | 117 inputs = [ | 
| 134 "$root_gen_dir/blink/core/inspector/protocol.json", | 118 "$root_gen_dir/blink/core/inspector/protocol.json", | 
| 135 ] | 119 ] | 
| 136 | 120 | 
| 137 outputs = generated_devtools_api | 121 outputs = generated_devtools_api | 
| 138 | 122 | 
| 139 sources = [ | 123 sources = [ | 
| 140 "lib/browser/domain_cc.template", | 124 "lib/browser/devtools_api/deprecated_type_conversions_h.template", | 
| 141 "lib/browser/domain_h.template", | 125 "lib/browser/devtools_api/deprecated_types_h.template", | 
| 142 "lib/browser/type_conversions_h.template", | 126 "lib/browser/devtools_api/domain_cc.template", | 
| 143 "lib/browser/types_cc.template", | 127 "lib/browser/devtools_api/domain_h.template", | 
| 144 "lib/browser/types_h.template", | 128 "lib/browser/devtools_api/domain_type_conversions_h.template", | 
| 129 "lib/browser/devtools_api/domain_types_cc.template", | |
| 130 "lib/browser/devtools_api/domain_types_forward_declaration_h.template", | |
| 131 "lib/browser/devtools_api/domain_types_h.template", | |
| 145 ] | 132 ] | 
| 146 | 133 | 
| 147 args = [ | 134 args = [ | 
| 148 "--protocol", | 135 "--protocol", | 
| 149 rebase_path(inputs[0], root_build_dir), | 136 rebase_path(inputs[0], root_build_dir), | 
| 150 "--output_dir", | 137 "--output_dir", | 
| 151 rebase_path(target_gen_dir) + "/public/domains", | 138 rebase_path(target_gen_dir) + "/public", | 
| 152 ] | 139 ] | 
| 153 } | 140 } | 
| 154 | 141 | 
| 155 static_library("headless_lib") { | 142 static_library("headless_lib") { | 
| 156 sources = generated_devtools_api + [ | 143 sources = generated_devtools_api + [ | 
| 157 "lib/browser/headless_browser_context_impl.cc", | 144 "lib/browser/headless_browser_context_impl.cc", | 
| 158 "lib/browser/headless_browser_context_impl.h", | 145 "lib/browser/headless_browser_context_impl.h", | 
| 159 "lib/browser/headless_browser_context_options.cc", | 146 "lib/browser/headless_browser_context_options.cc", | 
| 160 "lib/browser/headless_browser_context_options.h", | 147 "lib/browser/headless_browser_context_options.h", | 
| 161 "lib/browser/headless_browser_impl.cc", | 148 "lib/browser/headless_browser_impl.cc", | 
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 350 sources = [ | 337 sources = [ | 
| 351 "app/headless_shell.cc", | 338 "app/headless_shell.cc", | 
| 352 "app/headless_shell_switches.cc", | 339 "app/headless_shell_switches.cc", | 
| 353 "app/headless_shell_switches.h", | 340 "app/headless_shell_switches.h", | 
| 354 ] | 341 ] | 
| 355 | 342 | 
| 356 deps = [ | 343 deps = [ | 
| 357 "//headless:headless_lib", | 344 "//headless:headless_lib", | 
| 358 ] | 345 ] | 
| 359 } | 346 } | 
| OLD | NEW |