Commit 2e854975 authored by Robbie McElrath's avatar Robbie McElrath Committed by Commit Bot

[AW] Move devui to //aw/apk.

We eventually want all standalone webview code (i.e. code not run in an
embedder's app) to live in //aw/apk.

TBR=isherman@chromium.org

Test: ninja -C out/aw monochrome_apk, start CrashesListActivity
Bug: 934152
Change-Id: Ibfbdd63d40c1efc24e6bbe9fed08dab61269f482
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1815157
Commit-Queue: Robbie McElrath <rmcelrath@chromium.org>
Reviewed-by: default avatarAndrew Grieve <agrieve@chromium.org>
Reviewed-by: default avatarRichard Coles <torne@chromium.org>
Reviewed-by: default avatarNate Fischer <ntfschr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#708941}
parent 497d3415
......@@ -209,11 +209,6 @@ android_assets("stub_assets") {
]
}
android_resources("system_webview_resources") {
resource_dirs = [ "apk/java/res" ]
custom_package = system_webview_package_name
}
android_resources("resources") {
resource_dirs = [ "java/res" ]
custom_package = "org.chromium.android_webview"
......@@ -590,12 +585,6 @@ android_library("browser_java") {
"java/src/org/chromium/android_webview/permission/AwGeolocationCallback.java",
"java/src/org/chromium/android_webview/permission/AwPermissionRequest.java",
"java/src/org/chromium/android_webview/policy/AwPolicyProvider.java",
"java/src/org/chromium/android_webview/ui/CrashesListActivity.java",
"java/src/org/chromium/android_webview/ui/util/CrashInfoLoader.java",
"java/src/org/chromium/android_webview/ui/util/UnuploadedFilesStateLoader.java",
"java/src/org/chromium/android_webview/ui/util/UploadedCrashesInfoLoader.java",
"java/src/org/chromium/android_webview/ui/util/WebViewCrashInfoCollector.java",
"java/src/org/chromium/android_webview/ui/util/WebViewCrashLogParser.java",
]
deps = [
":common_aidl_java",
......@@ -609,7 +598,6 @@ android_library("browser_java") {
":common_platform_services_java",
":common_variations_utils_java",
":resources",
":strings_grd",
":system_webview_manifest",
"//base:base_java",
"//base:jni_java",
......
......@@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//android_webview/system_webview_apk_tmpl.gni")
import("//android_webview/variables.gni")
import("//build/config/android/rules.gni")
generate_jni("apk_jni_headers") {
......@@ -23,6 +25,7 @@ android_library("apk_java") {
"java/src/com/android/webview/chromium/WebViewApkApplication.java",
]
deps = [
":devui_java",
"//android_webview:android_webview_locale_config_java",
"//android_webview:common_commandline_java",
"//base:base_java",
......@@ -34,6 +37,26 @@ android_library("apk_java") {
annotation_processor_deps = [ "//base/android/jni_generator:jni_processor" ]
}
android_library("devui_java") {
java_files = [
"java/src/org/chromium/android_webview/devui/CrashesListActivity.java",
"java/src/org/chromium/android_webview/devui/util/CrashInfoLoader.java",
"java/src/org/chromium/android_webview/devui/util/UnuploadedFilesStateLoader.java",
"java/src/org/chromium/android_webview/devui/util/UploadedCrashesInfoLoader.java",
"java/src/org/chromium/android_webview/devui/util/WebViewCrashInfoCollector.java",
"java/src/org/chromium/android_webview/devui/util/WebViewCrashLogParser.java",
]
deps = [
":devui_resources",
"//android_webview:common_crash_java",
"//android_webview:system_webview_manifest",
"//base:base_java",
"//components/minidump_uploader:minidump_uploader_java",
]
android_manifest_for_lint = system_webview_android_manifest
min_sdk_version = 21
}
source_set("apk") {
sources = [
"webview_apk_application.cc",
......@@ -47,3 +70,14 @@ source_set("apk") {
"//components/about_ui:about_ui_android",
]
}
# WebView icon used by upstream SystemWebView and Trichrome.
android_resources("icon_resources") {
resource_dirs = [ "java/res_icon" ]
custom_package = "org.chromium.android_webview.icon"
}
android_resources("devui_resources") {
resource_dirs = [ "java/res_devui" ]
custom_package = "org.chromium.android_webview.devui"
}
......@@ -39,7 +39,7 @@
android:value="true" />
</activity>
<!--suppress HardcodedText -->
<activity android:name="org.chromium.android_webview.ui.CrashesListActivity"
<activity android:name="org.chromium.android_webview.devui.CrashesListActivity"
android:label="WebView Crashes"
android:process=":webview_apk"> {# Explicit process required for monochrome compatibility. #}
</activity>
......
......@@ -11,6 +11,9 @@
android_webview/java/strings/android_webview_strings.grd
See http://www.chromium.org/developers/design-documents/ui-localization
Dev UI strings should be inlined as they're not currently translated.
See crbug.com/1014805.
-->
<resources/>
// 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.android_webview.ui;
package org.chromium.android_webview.devui;
import android.app.Activity;
import android.content.Intent;
......@@ -18,10 +19,9 @@ import android.widget.Button;
import android.widget.ListView;
import android.widget.TextView;
import org.chromium.android_webview.R;
import org.chromium.android_webview.common.crash.CrashInfo;
import org.chromium.android_webview.common.crash.CrashInfo.UploadState;
import org.chromium.android_webview.ui.util.WebViewCrashInfoCollector;
import org.chromium.android_webview.devui.util.WebViewCrashInfoCollector;
import java.util.Date;
import java.util.List;
......
include_rules = [
"+components/minidump_uploader/android/java",
]
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.android_webview.ui.util;
package org.chromium.android_webview.devui.util;
import org.chromium.android_webview.common.crash.CrashInfo;
......
// 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.android_webview.ui.util;
package org.chromium.android_webview.devui.util;
import org.chromium.android_webview.common.crash.CrashInfo;
import org.chromium.android_webview.common.crash.CrashInfo.UploadState;
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.android_webview.ui.util;
package org.chromium.android_webview.devui.util;
import org.chromium.android_webview.common.crash.CrashInfo;
......
// 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.android_webview.ui.util;
package org.chromium.android_webview.devui.util;
import org.chromium.android_webview.common.crash.CrashInfo;
import org.chromium.android_webview.common.crash.CrashInfo.UploadState;
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.android_webview.ui.util;
package org.chromium.android_webview.devui.util;
import org.json.JSONException;
......
......@@ -2,7 +2,6 @@ include_rules = [
"+components/autofill/android/java",
"+components/background_task_scheduler/android/java",
"+components/embedder_support/android/java",
"+components/minidump_uploader/android/java",
"+components/navigation_interception/android/java",
"+components/policy/android/java",
"+components/safe_browsing/android/java",
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.android_webview.test.ui.util;
package org.chromium.android_webview.test.devui.util;
import static org.chromium.android_webview.test.OnlyRunIn.ProcessMode.SINGLE_PROCESS;
......@@ -17,9 +17,9 @@ import org.junit.runner.RunWith;
import org.chromium.android_webview.common.crash.CrashInfo;
import org.chromium.android_webview.common.crash.CrashInfo.UploadState;
import org.chromium.android_webview.devui.util.UnuploadedFilesStateLoader;
import org.chromium.android_webview.test.AwJUnit4ClassRunner;
import org.chromium.android_webview.test.OnlyRunIn;
import org.chromium.android_webview.ui.util.UnuploadedFilesStateLoader;
import org.chromium.components.minidump_uploader.CrashFileManager;
import java.io.File;
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.android_webview.test.ui.util;
package org.chromium.android_webview.test.devui.util;
import static org.chromium.android_webview.test.OnlyRunIn.ProcessMode.SINGLE_PROCESS;
......@@ -16,9 +16,9 @@ import org.junit.runner.RunWith;
import org.chromium.android_webview.common.crash.CrashInfo;
import org.chromium.android_webview.common.crash.CrashInfo.UploadState;
import org.chromium.android_webview.devui.util.UploadedCrashesInfoLoader;
import org.chromium.android_webview.test.AwJUnit4ClassRunner;
import org.chromium.android_webview.test.OnlyRunIn;
import org.chromium.android_webview.ui.util.UploadedCrashesInfoLoader;
import java.io.BufferedWriter;
import java.io.File;
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.android_webview.test.ui.util;
package org.chromium.android_webview.test.devui.util;
import static org.hamcrest.Matchers.contains;
import static org.hamcrest.Matchers.containsInAnyOrder;
......@@ -19,9 +19,9 @@ import org.junit.runner.RunWith;
import org.chromium.android_webview.common.crash.CrashInfo;
import org.chromium.android_webview.common.crash.CrashInfo.UploadState;
import org.chromium.android_webview.devui.util.WebViewCrashInfoCollector;
import org.chromium.android_webview.test.AwJUnit4ClassRunner;
import org.chromium.android_webview.test.OnlyRunIn;
import org.chromium.android_webview.ui.util.WebViewCrashInfoCollector;
import java.util.Arrays;
import java.util.List;
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.android_webview.test.ui.util;
package org.chromium.android_webview.test.devui.util;
import static org.hamcrest.Matchers.containsInAnyOrder;
import static org.hamcrest.Matchers.empty;
......@@ -16,8 +16,8 @@ import org.junit.rules.TemporaryFolder;
import org.junit.runner.RunWith;
import org.chromium.android_webview.common.crash.CrashInfo;
import org.chromium.android_webview.devui.util.WebViewCrashLogParser;
import org.chromium.android_webview.test.AwJUnit4ClassRunner;
import org.chromium.android_webview.ui.util.WebViewCrashLogParser;
import java.io.File;
import java.io.FileWriter;
......
......@@ -287,15 +287,15 @@ instrumentation_test_apk("webview_instrumentation_test_apk") {
"../javatests/src/org/chromium/android_webview/test/WebViewFindApisTestRule.java",
"../javatests/src/org/chromium/android_webview/test/WebViewModalDialogOverrideTest.java",
"../javatests/src/org/chromium/android_webview/test/common/variations/VariationsUtilsTest.java",
"../javatests/src/org/chromium/android_webview/test/devui/util/UnuploadedFilesStateLoaderTest.java",
"../javatests/src/org/chromium/android_webview/test/devui/util/UploadedCrashesInfoLoaderTest.java",
"../javatests/src/org/chromium/android_webview/test/devui/util/WebViewCrashInfoCollectorTest.java",
"../javatests/src/org/chromium/android_webview/test/devui/util/WebViewCrashLogParserTest.java",
"../javatests/src/org/chromium/android_webview/test/services/CrashReceiverServiceTest.java",
"../javatests/src/org/chromium/android_webview/test/services/MinidumpUploaderTest.java",
"../javatests/src/org/chromium/android_webview/test/services/MockVariationsSeedServer.java",
"../javatests/src/org/chromium/android_webview/test/services/VariationsSeedServerTest.java",
"../javatests/src/org/chromium/android_webview/test/services/VisualStateCallbackTest.java",
"../javatests/src/org/chromium/android_webview/test/ui/util/UnuploadedFilesStateLoaderTest.java",
"../javatests/src/org/chromium/android_webview/test/ui/util/UploadedCrashesInfoLoaderTest.java",
"../javatests/src/org/chromium/android_webview/test/ui/util/WebViewCrashInfoCollectorTest.java",
"../javatests/src/org/chromium/android_webview/test/ui/util/WebViewCrashLogParserTest.java",
"../javatests/src/org/chromium/android_webview/test/util/AwQuotaManagerBridgeTestUtil.java",
"../javatests/src/org/chromium/android_webview/test/util/AwTestTouchUtils.java",
"../javatests/src/org/chromium/android_webview/test/util/CommonResources.java",
......
......@@ -9,7 +9,7 @@ trichrome_webview_android_manifest =
upstream_only_webview_deps = [
"//android_webview:platform_service_bridge_upstream_implementation_java",
"//android_webview:system_webview_resources",
"//android_webview/apk:icon_resources",
]
webview_locale_config_java_package = "org.chromium.android_webview"
......@@ -1008,7 +1008,7 @@
<activity
android:label="WebView
Crashes"
android:name="org.chromium.android_webview.ui.CrashesListActivity"
android:name="org.chromium.android_webview.devui.CrashesListActivity"
android:process=":webview_apk"/>
<activity
android:enabled="false"
......
......@@ -88,9 +88,9 @@ template("trichrome_library_apk_tmpl") {
"//chrome/android:product_version_resources"
}
# TODO(torne): using system_webview_resources just to get a temporary icon
# TODO(torne): using icon_resources just to get a temporary icon
deps = [
"//android_webview:system_webview_resources",
"//android_webview/apk:icon_resources",
]
if (trichrome_shared_assets) {
......
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