| OLD | NEW |
| (Empty) |
| 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 | |
| 3 # found in the LICENSE file. | |
| 4 | |
| 5 import("//third_party/closure_compiler/closure_args.gni") | |
| 6 import("//third_party/document_image_extractor/document_image_extractor.gni") | |
| 7 import("//tools/grit/grit_rule.gni") | |
| 8 | |
| 9 closure_out_dir = | |
| 10 "$root_gen_dir/closure/components/resources/enhanced_bookmarks" | |
| 11 | |
| 12 # GYP version: components/resources/enhanced_bookmarks/enhanced_bookmarks_resour
ces.gyp | |
| 13 grit("enhanced_bookmarks_resources") { | |
| 14 source = "enhanced_bookmarks_resources.grd" | |
| 15 | |
| 16 outputs = [ | |
| 17 "grit/enhanced_bookmarks_resources.h", | |
| 18 "enhanced_bookmarks_resources.pak", | |
| 19 ] | |
| 20 output_dir = "$root_gen_dir/components/resources/enhanced_bookmarks" | |
| 21 deps = [ | |
| 22 "//components/resources/enhanced_bookmarks:document_image_extractor", | |
| 23 "//components/resources/enhanced_bookmarks:dom_initializer", | |
| 24 ] | |
| 25 | |
| 26 get_salient_image_url_gen_js = "${closure_out_dir}/get_salient_image_url.js" | |
| 27 dom_initializer_gen_js = "${closure_out_dir}/dom_initializer.js" | |
| 28 | |
| 29 grit_flags = [ | |
| 30 "-E", | |
| 31 "get_salient_image_url_gen_js=" + | |
| 32 rebase_path(get_salient_image_url_gen_js, root_build_dir), | |
| 33 "-E", | |
| 34 "dom_initializer_gen_js=" + | |
| 35 rebase_path(dom_initializer_gen_js, root_build_dir), | |
| 36 ] | |
| 37 } | |
| 38 | |
| 39 # GYP version: components/resources/enhanced_bookmarks/enhanced_bookmarks.gypi | |
| 40 rebased_closure_out_dir = rebase_path(root_gen_dir, "../") + | |
| 41 "/closure/components/resources/enhanced_bookmarks/" | |
| 42 | |
| 43 action("document_image_extractor") { | |
| 44 script = "//third_party/closure_compiler/compile.py" | |
| 45 sources = [ | |
| 46 "get_salient_image_url.js", | |
| 47 ] | |
| 48 outputs = [ | |
| 49 "${closure_out_dir}/get_salient_image_url.js", | |
| 50 ] | |
| 51 | |
| 52 document_image_extractor_sources = | |
| 53 rebase_path(document_image_extractor_js_files, "third_party/", "../") | |
| 54 | |
| 55 args = [ "../../components/resources/enhanced_bookmarks/get_salient_image_url.
js" ] + document_image_extractor_sources + [ | |
| 56 "--out-file=${rebased_closure_out_dir}/get_salient_image_url.js", | |
| 57 "--no-single-file", | |
| 58 "--closure-args", | |
| 59 ] + closure_args + default_disabled_closure_args + [ "output_wrapper='(
function(){%output% return GetSalientImageUrl();})();'" ] | |
| 60 } | |
| 61 | |
| 62 action("dom_initializer") { | |
| 63 script = "//third_party/closure_compiler/compile.py" | |
| 64 sources = [ | |
| 65 "dom_initializer.js", | |
| 66 ] | |
| 67 outputs = [ | |
| 68 "${closure_out_dir}/dom_initializer.js", | |
| 69 ] | |
| 70 | |
| 71 dom_controller_sources = | |
| 72 rebase_path(dom_controller_js_files, "third_party/", "../") | |
| 73 | |
| 74 args = | |
| 75 [ "../../components/resources/enhanced_bookmarks/dom_initializer.js" ] + | |
| 76 dom_controller_sources + | |
| 77 [ | |
| 78 "--out-file=${rebased_closure_out_dir}/dom_initializer.js", | |
| 79 "--no-single-file", | |
| 80 "--closure-args", | |
| 81 ] + closure_args + default_disabled_closure_args + | |
| 82 [ "output_wrapper='(function(){%output%})();'" ] | |
| 83 } | |
| OLD | NEW |