Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Unified Diff: third_party/WebKit/Source/build/convert_file_to_header_with_character_array.gni

Issue 1670813003: DevTools: do not use platform/ to load injected scripts into inspector/v8. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/build/convert_file_to_header_with_character_array.gni
diff --git a/third_party/WebKit/Source/build/convert_file_to_header_with_character_array.gni b/third_party/WebKit/Source/build/convert_file_to_header_with_character_array.gni
new file mode 100644
index 0000000000000000000000000000000000000000..199e78ea32deffc01298872389d7e50a63312a14
--- /dev/null
+++ b/third_party/WebKit/Source/build/convert_file_to_header_with_character_array.gni
@@ -0,0 +1,32 @@
+# Copyright 2016 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.
+
+# To use this:
+# convert_file_to_header_with_character_array("mytarget") {
+# input_file_path = "myfile.js"
+# output_file_path = "$root_gen_dir/blink/myfile.h"
+# character_array_name = "myfile_js"
+# }
+template("convert_file_to_header_with_character_array") {
+ assert(defined(invoker.input_file_path), "Need input_file_path.")
+ assert(defined(invoker.output_file_path), "Need output_file_path.")
+ assert(defined(invoker.character_array_name), "Need character_array_name.")
+
+ action(target_name) {
+ script = "//third_party/WebKit/Source/build/scripts/xxd.py"
+
+ inputs = [
+ invoker.input_file_path,
+ ]
+ outputs = [
+ invoker.output_file_path,
+ ]
+
+ args = [
+ invoker.character_array_name,
+ rebase_path(invoker.input_file_path, root_build_dir),
+ rebase_path(invoker.output_file_path, root_build_dir),
+ ]
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698