Commit f46a00a3 authored by Xing Liu's avatar Xing Liu Committed by Commit Bot

Chime DFM: Setup the boilerplate.

Chime is a notification library pulled in downstream clank repo, which
needs to ship in Android DFM.

This CL sets up the boilerplate for chime DFM module.

Bug: 1013386
Change-Id: I161613ca16adf5131d55b1803b6ad9e5821c80eb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1867379
Commit-Queue: Xing Liu <xingliu@chromium.org>
Reviewed-by: default avatarPeter Wen <wnwen@chromium.org>
Reviewed-by: default avatarMark Pearson <mpearson@chromium.org>
Reviewed-by: default avatarTibor Goldschwendt <tiborg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#707998}
parent 32158d9c
...@@ -512,6 +512,10 @@ java_group("chrome_all_java") { ...@@ -512,6 +512,10 @@ java_group("chrome_all_java") {
if (dfmify_dev_ui) { if (dfmify_dev_ui) {
deps += [ "//chrome/android/modules/dev_ui/provider:java" ] deps += [ "//chrome/android/modules/dev_ui/provider:java" ]
} }
if (use_chime_android_sdk) {
deps += [ "//chrome/android/modules/chime/public:java" ]
}
} }
# This is a list of all base module jni headers. New features should add their # This is a list of all base module jni headers. New features should add their
......
...@@ -3993,6 +3993,11 @@ The site does NOT gain access to the camera. The camera images are only visible ...@@ -3993,6 +3993,11 @@ The site does NOT gain access to the camera. The camera images are only visible
QR Code QR Code
</message> </message>
<!-- Chime DFM module strings -->
<message name="IDS_CHIME_MODULE_TITLE" desc="Text shown when the chime module is referenced in install start, success, failure UI (e.g. in IDS_MODULE_INSTALL_START_TEXT, which will expand to 'Installing Google Notifications Platform for Chrome…').">
Google Notifications Platform
</message>
</messages> </messages>
</release> </release>
</grit> </grit>
include_rules = [
"+components/module_installer",
]
dtrainor@chromium.org
hesen@chromium.org
xingliu@chromium.org
# Copyright 2019 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
declare_args() {
use_chime_android_sdk = false
}
# TODO(xingliu): Use enable_chrome_android_internal to select the downstream impl.
chime_module_desc = {
name = "chime"
android_manifest =
"//chrome/android/modules/chime/internal/java/AndroidManifest.xml"
java_deps = [ "//chrome/android/modules/chime/internal:java" ]
}
# Copyright 2019 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/config/android/rules.gni")
# Upstream chime DFM implementation which does nothing, the actual
# implementation lives in downstream repo.
android_library("java") {
java_files =
[ "java/src/org/chromium/chrome/modules/chime/ChimeModuleEntryImpl.java" ]
deps = [
"//base:base_java",
"//chrome/android/modules/chime/public:java",
]
}
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2019 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file. -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:dist="http://schemas.android.com/apk/distribution"
featureSplit="chime">
<dist:module
dist:onDemand="true"
dist:title="@string/chime_module_title">
<dist:fusing dist:include="true" />
</dist:module>
</manifest>
\ No newline at end of file
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.chrome.modules.chime;
import org.chromium.base.annotations.UsedByReflection;
/**
* Implementation of Chime DFM module hook. This is the upstream one that does nothing, the actual
* implementation lives in downstream.
*/
@UsedByReflection("ChimeModule")
public class ChimeModuleEntryImpl implements ChimeModuleEntry {
@Override
public void register() {}
}
# Copyright 2019 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/config/android/rules.gni")
android_library("java") {
java_files =
[ "java/src/org/chromium/chrome/modules/chime/ChimeModuleEntry.java" ]
deps = [
"//base:base_java",
"//components/module_installer/android:module_installer_java",
"//components/module_installer/android:module_interface_java",
]
annotation_processor_deps =
[ "//components/module_installer/android:module_interface_processor" ]
}
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.chrome.modules.chime;
import org.chromium.components.module_installer.builder.ModuleInterface;
/**
* Use this module to register to Chime notification platform.
*/
@ModuleInterface(module = "chime", impl = "org.chromium.chrome.modules.chime.ChimeModuleEntryImpl")
public interface ChimeModuleEntry {
/**
* Registers the Chime notification SDK to the server.
*/
void register();
}
...@@ -8,6 +8,7 @@ import( ...@@ -8,6 +8,7 @@ import(
import("//chrome/android/features/dev_ui/dev_ui_module.gni") import("//chrome/android/features/dev_ui/dev_ui_module.gni")
import("//chrome/android/features/tab_ui/tab_ui_module.gni") import("//chrome/android/features/tab_ui/tab_ui_module.gni")
import("//chrome/android/modules/buildflags.gni") import("//chrome/android/modules/buildflags.gni")
import("//chrome/android/modules/chime/chime_module.gni")
import("//chrome/android/modules/extra_icu/extra_icu_module.gni") import("//chrome/android/modules/extra_icu/extra_icu_module.gni")
import("//chrome/android/modules/test_dummy/test_dummy_module.gni") import("//chrome/android/modules/test_dummy/test_dummy_module.gni")
import("//device/vr/buildflags/buildflags.gni") import("//device/vr/buildflags/buildflags.gni")
...@@ -45,6 +46,9 @@ if (enable_vr) { ...@@ -45,6 +46,9 @@ if (enable_vr) {
if (dfmify_dev_ui) { if (dfmify_dev_ui) {
chrome_modern_module_descs += [ dev_ui_module_desc ] chrome_modern_module_descs += [ dev_ui_module_desc ]
} }
if (use_chime_android_sdk) {
chrome_modern_module_descs += [ chime_module_desc ]
}
# Modules shipped in Monochrome (Android N+). # Modules shipped in Monochrome (Android N+).
monochrome_module_descs = chrome_modern_module_descs monochrome_module_descs = chrome_modern_module_descs
......
...@@ -165673,6 +165673,7 @@ regressions. --> ...@@ -165673,6 +165673,7 @@ regressions. -->
<histogram_suffixes name="AndroidFeatureModuleName" separator="."> <histogram_suffixes name="AndroidFeatureModuleName" separator=".">
<suffix name="ar" label="Augmented Reality Module"/> <suffix name="ar" label="Augmented Reality Module"/>
<suffix name="autofill_assistant" label="Assistant-in-Chrome Module"/> <suffix name="autofill_assistant" label="Assistant-in-Chrome Module"/>
<suffix name="chime" label="Chime Notification Module"/>
<suffix name="dev_ui" label="Developer UI Module"/> <suffix name="dev_ui" label="Developer UI Module"/>
<suffix name="extra_icu" label="Extra ICU Module"/> <suffix name="extra_icu" label="Extra ICU Module"/>
<suffix name="tab_ui" label="Tab Management Module"/> <suffix name="tab_ui" label="Tab Management Module"/>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment