summaryrefslogtreecommitdiffstats
path: root/mojo
diff options
context:
space:
mode:
authorsky <sky@chromium.org>2015-05-01 16:21:51 -0700
committerCommit bot <commit-bot@chromium.org>2015-05-01 23:23:15 +0000
commit6de67f80026697580ed4cefa11a72193243bd4a0 (patch)
treea1faddfa0cc1bf907c2b381479a336f9482bbeb5 /mojo
parente732780029f2d752aed0fe14a788ef4ac3510308 (diff)
downloadchromium_src-6de67f80026697580ed4cefa11a72193243bd4a0.zip
chromium_src-6de67f80026697580ed4cefa11a72193243bd4a0.tar.gz
chromium_src-6de67f80026697580ed4cefa11a72193243bd4a0.tar.bz2
Adds resource_provider::ResourceProvider
It's used to fetch resources for mojo apps. R=ben@chromium.org Review URL: https://codereview.chromium.org/1108403008 Cr-Commit-Position: refs/heads/master@{#328014}
Diffstat (limited to 'mojo')
-rw-r--r--mojo/BUILD.gn9
-rw-r--r--mojo/mojo_application_package.gni19
-rw-r--r--mojo/services/BUILD.gn3
-rw-r--r--mojo/tools/data/apptests3
4 files changed, 26 insertions, 8 deletions
diff --git a/mojo/BUILD.gn b/mojo/BUILD.gn
index c89d084..c040306 100644
--- a/mojo/BUILD.gn
+++ b/mojo/BUILD.gn
@@ -38,4 +38,13 @@ group("tests") {
"//third_party/mojo/src/mojo/edk/test:mojo_public_system_unittests",
"//third_party/mojo/src/mojo/edk/test:mojo_public_utility_unittests",
]
+
+ # TODO: get these working on android.
+ if (!is_android && !is_component_build) {
+ deps += [
+ "//mojo/runner:apptests",
+ "//mojo/runner:mojo_runner_unittests",
+ "//mojo/shell:mojo_shell_unittests",
+ ]
+ }
}
diff --git a/mojo/mojo_application_package.gni b/mojo/mojo_application_package.gni
index 9e6c1fd..233ee97 100644
--- a/mojo/mojo_application_package.gni
+++ b/mojo/mojo_application_package.gni
@@ -9,18 +9,17 @@ import("//third_party/mojo/src/mojo/public/mojo_application.gni")
# output_name.mojo : the shared library
# resources : resources
template("mojo_application_package") {
- if (defined(invoker.output_name)) {
- output_name = invoker.output_name
- } else {
- output_name = target_name
- }
-
mojo_deps = []
if (defined(invoker.deps)) {
mojo_deps += invoker.deps
}
if (defined(invoker.resources)) {
+ output_name = target_name
+ if (defined(invoker.output_name)) {
+ output_name = invoker.output_name
+ }
+
copy("copy_mojo_application_resources") {
sources = invoker.resources
outputs = [
@@ -30,8 +29,12 @@ template("mojo_application_package") {
mojo_deps += [ ":copy_mojo_application_resources" ]
}
- mojo_native_application(output_name) {
- output_name = invoker.target_name + "/" + invoker.target_name
+ mojo_native_application(target_name) {
+ output_name = invoker.target_name
+ if (defined(invoker.output_name)) {
+ output_name = invoker.output_name
+ }
+ output_name = output_name + "/" + output_name
deps = mojo_deps
diff --git a/mojo/services/BUILD.gn b/mojo/services/BUILD.gn
index 652d418..cc7c0a6 100644
--- a/mojo/services/BUILD.gn
+++ b/mojo/services/BUILD.gn
@@ -23,6 +23,7 @@ group("services") {
"//components/html_viewer",
"//components/kiosk_wm:window_manager",
"//components/native_viewport",
+ "//components/resource_provider",
"//components/surfaces",
"//components/view_manager",
"//components/window_manager:lib",
@@ -51,6 +52,7 @@ group("tests") {
if (!is_component_build) {
deps += [
"//components/html_viewer:html_viewer_unittests",
+ "//components/resource_provider:tests",
"//components/view_manager:view_manager_service_unittests",
]
@@ -73,6 +75,7 @@ group("apptests") {
deps += [
"//components/clipboard:apptests",
"//components/html_viewer:apptests",
+ "//components/resource_provider:apptests",
"//components/view_manager:apptests",
"//components/window_manager:apptests",
"//mojo/services/network:apptests",
diff --git a/mojo/tools/data/apptests b/mojo/tools/data/apptests
index f023d70..2c892f4 100644
--- a/mojo/tools/data/apptests
+++ b/mojo/tools/data/apptests
@@ -51,4 +51,7 @@ tests = [
"test": "mojo:window_manager_apptests",
"shell-args": ["--use-headless-config"]
},
+ {
+ "test": "mojo:resource_provider_apptests",
+ },
]