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

Side by Side Diff: components/toolbar/BUILD.gn

Issue 2678913002: Add gn template for vector icon actions. (Closed)
Patch Set: docs Created 3 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 unified diff | Download patch
« no previous file with comments | « components/omnibox/browser/BUILD.gn ('k') | ui/vector_icons/vector_icons.gni » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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("//build/config/ui.gni") 5 import("//build/config/ui.gni")
6 import("//ui/vector_icons/vector_icons.gni")
6 7
7 action("aggregate_vector_icons") { 8 aggregate_vector_icons("toolbar_vector_icons") {
8 visibility = [ ":*" ] 9 icon_directory = "vector_icons"
9
10 script = "//ui/gfx/vector_icons/aggregate_vector_icons.py"
11 10
12 icons = [ 11 icons = [
13 # TODO(estade): this is the same as ui/gfx/vector_icons/business.icon. Use 12 # TODO(estade): this is the same as ui/gfx/vector_icons/business.icon. Use
14 # that one instead once it's been updated from VectorIconId to VectorIcon. 13 # that one instead once it's been updated from VectorIconId to VectorIcon.
15 "vector_icons/business.icon", 14 "business.icon",
16 "vector_icons/http.1x.icon", 15 "http.1x.icon",
17 "vector_icons/http.icon", 16 "http.icon",
18 "vector_icons/https_invalid.1x.icon", 17 "https_invalid.1x.icon",
19 "vector_icons/https_invalid.icon", 18 "https_invalid.icon",
20 "vector_icons/https_valid.1x.icon", 19 "https_valid.1x.icon",
21 "vector_icons/https_valid.icon", 20 "https_valid.icon",
22 "vector_icons/https_valid_in_chip.1x.icon", 21 "https_valid_in_chip.1x.icon",
23 "vector_icons/https_valid_in_chip.icon", 22 "https_valid_in_chip.icon",
24 "vector_icons/product.1x.icon", 23 "product.1x.icon",
25 "vector_icons/product.icon", 24 "product.icon",
26 "vector_icons/star_active.icon", 25 "star_active.icon",
27 "vector_icons/star.icon", 26 "star.icon",
28 ]
29
30 output_cc = "$target_gen_dir/vector_icons.cc"
31 output_h = "$target_gen_dir/vector_icons.h"
32
33 inputs = icons
34 inputs += [
35 "vector_icons/vector_icons.cc.template",
36 "vector_icons/vector_icons.h.template",
37 ]
38 outputs = [
39 output_cc,
40 output_h,
41 ]
42
43 response_file_contents = rebase_path(icons, root_build_dir)
44
45 args = [
46 "--working_directory=" + rebase_path("./vector_icons"),
47 "--file_list={{response_file_name}}",
48 "--output_cc=" + rebase_path(output_cc, root_build_dir),
49 "--output_h=" + rebase_path(output_h, root_build_dir),
50 ] 27 ]
51 } 28 }
52 29
53 static_library("toolbar") { 30 static_library("toolbar") {
54 sources = [ 31 sources = [
55 "toolbar_model.h", 32 "toolbar_model.h",
56 "toolbar_model_delegate.h", 33 "toolbar_model_delegate.h",
57 "toolbar_model_impl.cc", 34 "toolbar_model_impl.cc",
58 "toolbar_model_impl.h", 35 "toolbar_model_impl.h",
59 ] 36 ]
60 37
61 deps = [ 38 deps = [
62 "//base", 39 "//base",
63 "//components/google/core/browser", 40 "//components/google/core/browser",
64 "//components/prefs", 41 "//components/prefs",
65 "//components/resources", 42 "//components/resources",
66 "//components/security_state/core", 43 "//components/security_state/core",
67 "//components/strings", 44 "//components/strings",
68 "//components/url_formatter", 45 "//components/url_formatter",
69 "//net", 46 "//net",
70 "//ui/base", 47 "//ui/base",
71 "//ui/gfx", 48 "//ui/gfx",
72 "//url", 49 "//url",
73 ] 50 ]
74 51
75 if (!is_android && !is_ios) { 52 if (!is_android && !is_ios) {
76 sources += get_target_outputs(":aggregate_vector_icons") 53 sources += get_target_outputs(":toolbar_vector_icons")
77 deps += [ ":aggregate_vector_icons" ] 54 deps += [ ":toolbar_vector_icons" ]
78 } 55 }
79 } 56 }
80 57
81 static_library("test_support") { 58 static_library("test_support") {
82 testonly = true 59 testonly = true
83 60
84 sources = [ 61 sources = [
85 "test_toolbar_model.cc", 62 "test_toolbar_model.cc",
86 "test_toolbar_model.h", 63 "test_toolbar_model.h",
87 ] 64 ]
88 65
89 deps = [ 66 deps = [
90 ":toolbar", 67 ":toolbar",
91 "//base", 68 "//base",
92 "//components/resources", 69 "//components/resources",
93 "//ui/gfx", 70 "//ui/gfx",
94 ] 71 ]
95 72
96 if (toolkit_views) { 73 if (toolkit_views) {
97 # Needed to get the TOOLKIT_VIEWS define. 74 # Needed to get the TOOLKIT_VIEWS define.
98 deps += [ "//ui/views" ] 75 deps += [ "//ui/views" ]
99 } 76 }
100 } 77 }
OLDNEW
« no previous file with comments | « components/omnibox/browser/BUILD.gn ('k') | ui/vector_icons/vector_icons.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698