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("//tools/grit/grit_rule.gni") | 5 import("//tools/grit/grit_rule.gni") |
6 | 6 |
7 closure_out_dir = "$root_gen_dir/closure/components/resources/enhanced_bookmarks
" | 7 closure_out_dir = |
| 8 "$root_gen_dir/closure/components/resources/enhanced_bookmarks" |
| 9 |
| 10 closure_args = [ |
| 11 "accept_const_keyword", |
| 12 "compilation_level=SIMPLE_OPTIMIZATIONS", |
| 13 "extra_annotation_name=attribute", |
| 14 "extra_annotation_name=element", |
| 15 "extra_annotation_name=group", |
| 16 "extra_annotation_name=homepage", |
| 17 "extra_annotation_name=status", |
| 18 "extra_annotation_name=submodule", |
| 19 "jscomp_error=accessControls", |
| 20 "jscomp_error=ambiguousFunctionDecl", |
| 21 "jscomp_error=checkStructDictInheritance", |
| 22 "jscomp_error=checkTypes", |
| 23 "jscomp_error=checkVars", |
| 24 "jscomp_error=constantProperty", |
| 25 "jscomp_error=deprecated", |
| 26 "jscomp_error=externsValidation", |
| 27 "jscomp_error=globalThis", |
| 28 "jscomp_error=invalidCasts", |
| 29 "jscomp_error=missingProperties", |
| 30 "jscomp_error=missingReturn", |
| 31 "jscomp_error=nonStandardJsDocs", |
| 32 "jscomp_error=suspiciousCode", |
| 33 "jscomp_error=undefinedNames", |
| 34 "jscomp_error=undefinedVars", |
| 35 "jscomp_error=unknownDefines", |
| 36 "jscomp_error=uselessCode", |
| 37 "jscomp_error=visibility", |
| 38 "jscomp_off=duplicate", |
| 39 "jscomp_off=misplacedTypeAnnotation", |
| 40 "language_in=ECMASCRIPT5_STRICT", |
| 41 "polymer_pass", |
| 42 "source_map_format=V3", |
| 43 "summary_detail_level=3", |
| 44 ] |
8 | 45 |
9 # GYP version: components/resources/enhanced_bookmarks/enhanced_bookmarks_resour
ces.gyp | 46 # GYP version: components/resources/enhanced_bookmarks/enhanced_bookmarks_resour
ces.gyp |
10 # (generate_enhanced_bookmarks_resources action) | 47 # (generate_enhanced_bookmarks_resources action) |
11 grit("enhanced_bookmarks_resources") { | 48 grit("enhanced_bookmarks_resources") { |
12 source = "enhanced_bookmarks_resources.grd" | 49 source = "enhanced_bookmarks_resources.grd" |
13 | 50 |
14 outputs = [ | 51 outputs = [ |
15 "grit/enhanced_bookmarks_resources.h", | 52 "grit/enhanced_bookmarks_resources.h", |
16 "enhanced_bookmarks_resources.pak", | 53 "enhanced_bookmarks_resources.pak", |
17 ] | 54 ] |
(...skipping 13 matching lines...) Expand all Loading... |
31 "-E", | 68 "-E", |
32 "dom_initializer_gen_js=" + | 69 "dom_initializer_gen_js=" + |
33 rebase_path(dom_initializer_gen_js, root_build_dir), | 70 rebase_path(dom_initializer_gen_js, root_build_dir), |
34 ] | 71 ] |
35 } | 72 } |
36 | 73 |
37 # GYP version: components/resources/enhanced_bookmarks/enhanced_bookmarks.gypi | 74 # GYP version: components/resources/enhanced_bookmarks/enhanced_bookmarks.gypi |
38 import("//third_party/document_image_extractor/document_image_extractor.gni") | 75 import("//third_party/document_image_extractor/document_image_extractor.gni") |
39 | 76 |
40 rebased_closure_out_dir = rebase_path(root_gen_dir, "../") + | 77 rebased_closure_out_dir = rebase_path(root_gen_dir, "../") + |
41 "/closure/components/resources/enhanced_bookmarks/" | 78 "/closure/components/resources/enhanced_bookmarks/" |
42 | 79 |
43 action("document_image_extractor") { | 80 action("document_image_extractor") { |
44 script = "//third_party/closure_compiler/compile.py" | 81 script = "//third_party/closure_compiler/compile.py" |
45 sources = [ | 82 sources = [ |
46 "get_salient_image_url.js", | 83 "get_salient_image_url.js", |
47 ] | 84 ] |
48 outputs = [ | 85 outputs = [ |
49 "${closure_out_dir}/get_salient_image_url.js", | 86 "${closure_out_dir}/get_salient_image_url.js", |
50 ] | 87 ] |
51 | 88 |
52 document_image_extractor_sources = | 89 document_image_extractor_sources = |
53 rebase_path(document_image_extractor_js_files, "third_party/", "../") | 90 rebase_path(document_image_extractor_js_files, "third_party/", "../") |
54 | 91 |
55 args = | 92 args = [ "../../components/resources/enhanced_bookmarks/get_salient_image_url.
js" ] + document_image_extractor_sources + [ |
56 [ "../../components/resources/enhanced_bookmarks/get_salient_image_url.
js" ] + | 93 "--out-file=${rebased_closure_out_dir}/get_salient_image_url.js", |
57 document_image_extractor_sources + | |
58 [ | |
59 "--out_file=${rebased_closure_out_dir}/get_salient_image_url.js", | |
60 "--no-single-file", | 94 "--no-single-file", |
61 "--output_wrapper", | 95 "--closure-args", |
62 "(function(){%output% return GetSalientImageUrl();})();", | 96 ] + closure_args + [ "output_wrapper='(function(){%output% return GetSa
lientImageUrl();})();'" ] |
63 ] | |
64 } | 97 } |
65 | 98 |
66 action("dom_initializer") { | 99 action("dom_initializer") { |
67 script = "//third_party/closure_compiler/compile.py" | 100 script = "//third_party/closure_compiler/compile.py" |
68 sources = [ | 101 sources = [ |
69 "dom_initializer.js", | 102 "dom_initializer.js", |
70 ] | 103 ] |
71 outputs = [ | 104 outputs = [ |
72 "${closure_out_dir}/dom_initializer.js", | 105 "${closure_out_dir}/dom_initializer.js", |
73 ] | 106 ] |
74 | 107 |
75 dom_controller_sources = | 108 dom_controller_sources = |
76 rebase_path(dom_controller_js_files, "third_party/", "../") | 109 rebase_path(dom_controller_js_files, "third_party/", "../") |
77 | 110 |
78 args = | 111 args = |
79 [ "../../components/resources/enhanced_bookmarks/dom_initializer.js" ] + | 112 [ "../../components/resources/enhanced_bookmarks/dom_initializer.js" ] + |
80 dom_controller_sources + | 113 dom_controller_sources + |
81 [ | 114 [ |
82 "--out_file=${rebased_closure_out_dir}/dom_initializer.js", | 115 "--out-file=${rebased_closure_out_dir}/dom_initializer.js", |
83 "--no-single-file", | 116 "--no-single-file", |
84 "--output_wrapper", | 117 "--closure-args", |
85 "(function(){%output%})();", | 118 ] + closure_args + [ "output_wrapper='(function(){%output%})();'" ] |
86 ] | |
87 } | 119 } |
OLD | NEW |