| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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 import("//tools/grit/repack.gni") | 6 import("//tools/grit/repack.gni") |
| 7 import("//ui/base/ui_features.gni") | 7 import("//ui/base/ui_features.gni") |
| 8 | 8 |
| 9 assert(enable_hidpi) | 9 assert(enable_hidpi) |
| 10 | 10 |
| 11 grit("resources") { | 11 grit("resources") { |
| 12 source = "ash_resources.grd" | 12 source = "ash_resources.grd" |
| 13 outputs = [ | 13 outputs = [ |
| 14 "grit/ash_resources.h", | 14 "grit/ash_resources.h", |
| 15 "ash_resources_100_percent.pak", | 15 "ash_resources_100_percent.pak", |
| 16 "ash_resources_200_percent.pak", | 16 "ash_resources_200_percent.pak", |
| 17 ] | 17 ] |
| 18 } | 18 } |
| 19 | 19 |
| 20 # Generates a rule to repack ash resources for a given percentage (e.g. "100"). | 20 # Generates a rule to repack ash resources for a given percentage (e.g. "100"). |
| 21 # TODO(msw): Use ui_test.pak instead of its pieces? (no 200% support?) | 21 # TODO(msw): Use ui_test.pak instead of its pieces? (no 200% support?) |
| 22 template("ash_test_resources") { | 22 template("ash_test_resources") { |
| 23 percent = invoker.percent | 23 percent = invoker.percent |
| 24 | 24 |
| 25 repack("ash_test_resources_${target_name}") { | 25 repack("ash_test_resources_${target_name}") { |
| 26 output = "$root_build_dir/ash_test_resources_${percent}_percent.pak" | 26 output = "$root_build_dir/ash_test_resources_${percent}_percent.pak" |
| 27 | 27 |
| 28 sources = [ | 28 sources = [ |
| 29 "$root_gen_dir/ash/resources/ash_resources_${percent}_percent.pak", | 29 "$root_gen_dir/ash/resources/ash_resources_${percent}_percent.pak", |
| 30 "$root_gen_dir/ash/wm/common/resources/ash_wm_common_resources_${percent}_
percent.pak", | |
| 31 "$root_gen_dir/ui/resources/ui_resources_${percent}_percent.pak", | 30 "$root_gen_dir/ui/resources/ui_resources_${percent}_percent.pak", |
| 32 ] | 31 ] |
| 33 | 32 |
| 34 if (percent == "100") { | 33 if (percent == "100") { |
| 35 sources += [ | 34 sources += [ |
| 36 "$root_gen_dir/content/content_resources.pak", | 35 "$root_gen_dir/content/content_resources.pak", |
| 37 "$root_gen_dir/ui/resources/webui_resources.pak", | 36 "$root_gen_dir/ui/resources/webui_resources.pak", |
| 38 ] | 37 ] |
| 39 } | 38 } |
| 40 | 39 |
| 41 deps = [ | 40 deps = [ |
| 42 ":resources", | 41 "//ash/resources", |
| 43 "//ash/wm/common/resources", | |
| 44 "//content:resources", | 42 "//content:resources", |
| 45 "//ui/resources", | 43 "//ui/resources", |
| 46 ] | 44 ] |
| 47 | 45 |
| 48 if (toolkit_views) { | 46 if (toolkit_views) { |
| 49 deps += [ | 47 deps += [ |
| 50 "//ui/app_list/resources", | 48 "//ui/app_list/resources", |
| 51 "//ui/views/resources", | 49 "//ui/views/resources", |
| 52 ] | 50 ] |
| 53 sources += [ | 51 sources += [ |
| (...skipping 16 matching lines...) Expand all Loading... |
| 70 } | 68 } |
| 71 } | 69 } |
| 72 | 70 |
| 73 ash_test_resources("100_percent") { | 71 ash_test_resources("100_percent") { |
| 74 percent = "100" | 72 percent = "100" |
| 75 } | 73 } |
| 76 | 74 |
| 77 ash_test_resources("200_percent") { | 75 ash_test_resources("200_percent") { |
| 78 percent = "200" | 76 percent = "200" |
| 79 } | 77 } |
| OLD | NEW |