summaryrefslogtreecommitdiffstats
path: root/chromium/third_party/WebKit/Source/core/inspector/BUILD.gn
blob: db6ac1ea4ba13980186818e80aeaac594ee832cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//third_party/WebKit/Source/build/convert_file_to_header_with_character_array.gni")
import("//third_party/WebKit/Source/bindings/bindings.gni")
import("//third_party/WebKit/Source/core/core.gni")

visibility = "//third_party/WebKit/Source/*"

protocol_file = "../../devtools/protocol.json"

action("protocol_sources") {
  script = "CodeGeneratorInspector.py"

  source_prereqs = [
    # The helper script imported by CodeGeneratorInspector.py.
    "CodeGeneratorInspectorStrings.py",
    protocol_file,
  ]
  outputs = [
    "$blink_core_output_dir/InspectorBackendDispatcher.cpp",
    "$blink_core_output_dir/InspectorBackendDispatcher.h",
    "$blink_core_output_dir/InspectorFrontend.cpp",
    "$blink_core_output_dir/InspectorFrontend.h",
    "$blink_core_output_dir/InspectorTypeBuilder.cpp",
    "$blink_core_output_dir/InspectorTypeBuilder.h",
  ]

  args = [
    rebase_path(protocol_file, root_build_dir),
    "--output_dir", rebase_path(blink_core_output_dir, root_build_dir),
  ]

  deps = [
    ":protocol_version",
  ]
}

action("instrumentation_sources") {
  script = "CodeGeneratorInstrumentation.py"

  source_prereqs = [
    # Input file for the script.
    "InspectorInstrumentation.idl",
  ]

  outputs = [
    "$blink_core_output_dir/InspectorCanvasInstrumentationInl.h",
    "$blink_core_output_dir/InspectorConsoleInstrumentationInl.h",
    "$blink_core_output_dir/InspectorInstrumentationInl.h",
    "$blink_core_output_dir/InspectorOverridesInl.h",
    "$blink_core_output_dir/InstrumentingAgentsInl.h",
    "$blink_core_output_dir/InspectorInstrumentationImpl.cpp",
  ]

  args = [
    rebase_path("InspectorInstrumentation.idl", root_build_dir),
    "--output_dir", rebase_path(blink_core_output_dir, root_build_dir),
  ]
}

action("protocol_version") {
  script = "generate-inspector-protocol-version"

  source_prereqs = [ protocol_file ]
  output_file = "$blink_core_output_dir/InspectorProtocolVersion.h"
  outputs = [ output_file ]

  args = [
    "-o", rebase_path(output_file, root_build_dir),
    rebase_path(protocol_file, root_build_dir),
  ]
}

convert_file_to_header_with_character_array("inspector_overlay_page") {
  input_file_path = "InspectorOverlayPage.html"
  output_file_path = "$blink_core_output_dir/InspectorOverlayPage.h"
  character_array_name = "InspectorOverlayPage_html"
}

convert_file_to_header_with_character_array("injected_canvas_script_source") {
  input_file_path = "InjectedScriptCanvasModuleSource.js"
  output_file_path = "$blink_core_output_dir/InjectedScriptCanvasModuleSource.h"
  character_array_name = "InjectedScriptCanvasModuleSource_js"
}

convert_file_to_header_with_character_array("injected_script_source") {
  input_file_path = "InjectedScriptSource.js"
  output_file_path = "$blink_core_output_dir/InjectedScriptSource.h"
  character_array_name = "InjectedScriptSource_js"
}

convert_file_to_header_with_character_array("debugger_script_source") {
  input_file_path = "$bindings_v8_dir/DebuggerScript.js"
  output_file_path = "$blink_core_output_dir/DebuggerScriptSource.h"
  character_array_name = "DebuggerScriptSource_js"
}