Commit 9c215b93 authored by Shakti Sahu's avatar Shakti Sahu Committed by Commit Bot

ThinWebView : Moved ThinWebView to components

This CL moves ThinWebView to components/thin_webview so that features
such as payments can use it while being on components.

Bug: 1116770
Change-Id: Ie412a88f2ef630739b2bf5828b89b3c1c5e4c44a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2358994Reviewed-by: default avatarJohn Abd-El-Malek <jam@chromium.org>
Reviewed-by: default avatarTed Choc <tedchoc@chromium.org>
Reviewed-by: default avatarDavid Trainor <dtrainor@chromium.org>
Commit-Queue: Shakti Sahu <shaktisahu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#799892}
parent d41eab55
......@@ -303,8 +303,6 @@ android_library("chrome_java") {
"//chrome/android/webapk/libs/runtime_library:webapk_service_aidl_java",
"//chrome/browser/android/crypto:java",
"//chrome/browser/android/lifecycle:java",
"//chrome/browser/android/thin_webview:factory_java",
"//chrome/browser/android/thin_webview:java",
"//chrome/browser/browser_controls/android:java",
"//chrome/browser/contextmenu:java",
"//chrome/browser/download/android:factory_java",
......@@ -433,6 +431,8 @@ android_library("chrome_java") {
"//components/subresource_filter/android:java",
"//components/sync/android:sync_java",
"//components/sync/protocol:protocol_java",
"//components/thin_webview:factory_java",
"//components/thin_webview:java",
"//components/translate/content/android:java",
"//components/translate/content/android:translate_android_enums_java",
"//components/url_formatter/android:url_formatter_java",
......
......@@ -2,7 +2,6 @@ include_rules = [
"-chrome/android/features/keyboard_accessory/internal",
"+chrome/browser/android/lifecycle",
"+chrome/browser/android/thin_webview/java",
"+chrome/browser/privacy",
"+chrome/browser/profiles/android/java",
"+chrome/browser/share/android",
......@@ -49,6 +48,7 @@ include_rules = [
"+components/security_state/content/android/java",
"+components/sync/android/java/src/org/chromium/components/sync",
"+components/query_tiles/android/java",
"+components/thin_webview/java",
"-content/public/android",
"+content/public/android/java/src/org/chromium/content_public",
......
......@@ -20,14 +20,14 @@ import androidx.annotation.Nullable;
import org.chromium.base.ApiCompatibilityUtils;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.thinwebview.ThinWebView;
import org.chromium.chrome.browser.thinwebview.ThinWebViewConstraints;
import org.chromium.chrome.browser.thinwebview.ThinWebViewFactory;
import org.chromium.components.browser_ui.bottomsheet.BottomSheetContent;
import org.chromium.components.browser_ui.widget.FadingShadow;
import org.chromium.components.browser_ui.widget.FadingShadowView;
import org.chromium.components.embedder_support.delegate.WebContentsDelegateAndroid;
import org.chromium.components.embedder_support.view.ContentView;
import org.chromium.components.thinwebview.ThinWebView;
import org.chromium.components.thinwebview.ThinWebViewConstraints;
import org.chromium.components.thinwebview.ThinWebViewFactory;
import org.chromium.components.url_formatter.SchemeDisplay;
import org.chromium.components.url_formatter.UrlFormatter;
import org.chromium.content_public.browser.RenderCoordinates;
......
......@@ -29,9 +29,9 @@ import org.chromium.chrome.browser.init.AsyncInitializationActivity;
import org.chromium.chrome.browser.tab.EmptyTabObserver;
import org.chromium.chrome.browser.tab.Tab;
import org.chromium.chrome.browser.tab.TabUtils;
import org.chromium.chrome.browser.thinwebview.CompositorView;
import org.chromium.chrome.browser.thinwebview.CompositorViewFactory;
import org.chromium.chrome.browser.thinwebview.ThinWebViewConstraints;
import org.chromium.components.thinwebview.CompositorView;
import org.chromium.components.thinwebview.CompositorViewFactory;
import org.chromium.components.thinwebview.ThinWebViewConstraints;
import org.chromium.content_public.browser.MediaSession;
import org.chromium.content_public.browser.MediaSessionObserver;
import org.chromium.ui.base.ActivityWindowAndroid;
......
......@@ -13,14 +13,14 @@ import org.chromium.chrome.browser.ChromeActivity;
import org.chromium.chrome.browser.ChromeVersionInfo;
import org.chromium.chrome.browser.WebContentsFactory;
import org.chromium.chrome.browser.payments.handler.toolbar.PaymentHandlerToolbarCoordinator;
import org.chromium.chrome.browser.thinwebview.ThinWebView;
import org.chromium.chrome.browser.thinwebview.ThinWebViewConstraints;
import org.chromium.chrome.browser.thinwebview.ThinWebViewFactory;
import org.chromium.components.browser_ui.bottomsheet.BottomSheetController;
import org.chromium.components.browser_ui.bottomsheet.BottomSheetControllerProvider;
import org.chromium.components.browser_ui.styles.R;
import org.chromium.components.embedder_support.view.ContentView;
import org.chromium.components.payments.PaymentFeatureList;
import org.chromium.components.thinwebview.ThinWebView;
import org.chromium.components.thinwebview.ThinWebViewConstraints;
import org.chromium.components.thinwebview.ThinWebViewFactory;
import org.chromium.content_public.browser.LoadUrlParams;
import org.chromium.content_public.browser.SelectionClient;
import org.chromium.content_public.browser.SelectionPopupController;
......
......@@ -2961,7 +2961,6 @@ static_library("browser") {
":usage_stats_proto",
"//chrome/android:jni_headers",
"//chrome/android/modules/extra_icu/provider:native",
"//chrome/browser/android/thin_webview/internal",
"//chrome/browser/android/webapk:proto",
"//chrome/browser/flags:flags_android",
"//chrome/browser/notifications/chime/android",
......@@ -3012,6 +3011,7 @@ static_library("browser") {
"//components/signin/internal/identity_manager", # cf android / signin /
# DEPS
"//components/subresource_filter/android",
"//components/thin_webview/internal",
"//components/viz/common",
"//ipc:param_traits",
"//media/mojo/clients",
......
include_rules = [
"+content/public/android/java/src/org/chromium/content_public",
"+components/thin_webview",
]
......@@ -5,7 +5,7 @@
#ifndef CHROME_BROWSER_ANDROID_THIN_WEBVIEW_CHROME_THIN_WEBVIEW_INITIALIZER_H_
#define CHROME_BROWSER_ANDROID_THIN_WEBVIEW_CHROME_THIN_WEBVIEW_INITIALIZER_H_
#include "chrome/browser/android/thin_webview/thin_webview_initializer.h"
#include "components/thin_webview/thin_webview_initializer.h"
namespace thin_webview {
namespace android {
......
......@@ -803,7 +803,6 @@ static_library("ui") {
deps += [
"//chrome/android:jni_headers",
"//chrome/android/features/dev_ui:buildflags",
"//chrome/browser/android/thin_webview:thin_webview",
"//chrome/browser/image_decoder",
"//chrome/browser/resources/webapks:webapks_ui_resources",
"//components/browser_ui/client_certificate/android",
......@@ -817,6 +816,7 @@ static_library("ui") {
"//components/page_info",
"//components/page_info/android:android",
"//components/subresource_filter/core/browser",
"//components/thin_webview:thin_webview",
"//components/translate/content/android",
"//crypto:platform",
"//device/vr/buildflags",
......
include_rules = [
"+cc/layers",
"+chrome/browser/android/thin_webview",
]
\ No newline at end of file
"+components/thin_webview",
]
......@@ -9,7 +9,7 @@
#include "cc/layers/surface_layer.h"
#include "chrome/android/chrome_jni_headers/PictureInPictureActivity_jni.h"
#include "chrome/browser/android/tab_android.h"
#include "chrome/browser/android/thin_webview/compositor_view.h"
#include "components/thin_webview/compositor_view.h"
#include "content/public/browser/overlay_window.h"
#include "content/public/browser/picture_in_picture_window_controller.h"
#include "ui/android/window_android_compositor.h"
......
......@@ -16,9 +16,9 @@ source_set("thin_webview") {
android_library("java") {
sources = [
"java/src/org/chromium/chrome/browser/thinwebview/CompositorView.java",
"java/src/org/chromium/chrome/browser/thinwebview/ThinWebView.java",
"java/src/org/chromium/chrome/browser/thinwebview/ThinWebViewConstraints.java",
"java/src/org/chromium/components/thinwebview/CompositorView.java",
"java/src/org/chromium/components/thinwebview/ThinWebView.java",
"java/src/org/chromium/components/thinwebview/ThinWebViewConstraints.java",
]
deps = [
......@@ -32,8 +32,8 @@ android_library("java") {
android_library("factory_java") {
sources = [
"java/src/org/chromium/chrome/browser/thinwebview/CompositorViewFactory.java",
"java/src/org/chromium/chrome/browser/thinwebview/ThinWebViewFactory.java",
"java/src/org/chromium/components/thinwebview/CompositorViewFactory.java",
"java/src/org/chromium/components/thinwebview/ThinWebViewFactory.java",
]
deps = [
......
include_rules = [
"+cc/layers",
"+components/embedder_support/android/delegate/web_contents_delegate_android.h",
"+components/embedder_support/android",
"+content/public/android/java/src/org/chromium/content_public",
"+ui/android",
]
dtrainor@chromium.org
shaktisahu@chromium.org
# COMPONENT: UI>Browser>Mobile>ThinWebView
# OS: Android
\ No newline at end of file
......@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_ANDROID_THIN_WEBVIEW_COMPOSITOR_VIEW_H_
#define CHROME_BROWSER_ANDROID_THIN_WEBVIEW_COMPOSITOR_VIEW_H_
#ifndef COMPONENTS_THIN_WEBVIEW_COMPOSITOR_VIEW_H_
#define COMPONENTS_THIN_WEBVIEW_COMPOSITOR_VIEW_H_
#include "base/android/jni_android.h"
#include "base/android/scoped_java_ref.h"
......@@ -28,4 +28,4 @@ class CompositorView {
} // namespace android
} // namespace thin_webview
#endif // CHROME_BROWSER_ANDROID_THIN_WEBVIEW_COMPOSITOR_VIEW_H_
#endif // COMPONENTS_THIN_WEBVIEW_COMPOSITOR_VIEW_H_
......@@ -16,14 +16,13 @@ static_library("internal") {
deps = [
":jni_headers",
"//cc",
"//chrome/browser/ui",
"//skia",
]
public_deps = [
"//base",
"//chrome/browser/android/thin_webview",
"//components/embedder_support/android:web_contents_delegate",
"//components/thin_webview",
"//content/public/browser",
"//ui/android",
]
......@@ -31,15 +30,15 @@ static_library("internal") {
android_library("internal_java") {
sources = [
"java/src/org/chromium/chrome/browser/thinwebview/internal/CompositorViewImpl.java",
"java/src/org/chromium/chrome/browser/thinwebview/internal/ThinWebViewImpl.java",
"java/src/org/chromium/components/thinwebview/internal/CompositorViewImpl.java",
"java/src/org/chromium/components/thinwebview/internal/ThinWebViewImpl.java",
]
deps = [
"//base:base_java",
"//base:jni_java",
"//chrome/browser/android/thin_webview:java",
"//components/embedder_support/android:web_contents_delegate_java",
"//components/thin_webview:java",
"//content/public/android:content_java",
"//third_party/android_deps:androidx_annotation_annotation_java",
"//ui/android:ui_java",
......@@ -50,7 +49,7 @@ android_library("internal_java") {
generate_jni("jni_headers") {
visibility = [ ":*" ]
sources = [
"java/src/org/chromium/chrome/browser/thinwebview/internal/CompositorViewImpl.java",
"java/src/org/chromium/chrome/browser/thinwebview/internal/ThinWebViewImpl.java",
"java/src/org/chromium/components/thinwebview/internal/CompositorViewImpl.java",
"java/src/org/chromium/components/thinwebview/internal/ThinWebViewImpl.java",
]
}
include_rules = [
"+cc/layers",
"+components/permissions",
"+content/public",
"+third_party/skia/include",
]
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/android/thin_webview/internal/compositor_view_impl.h"
#include "components/thin_webview/internal/compositor_view_impl.h"
#include <android/native_window_jni.h>
......@@ -10,7 +10,7 @@
#include "base/android/jni_android.h"
#include "cc/layers/solid_color_layer.h"
#include "chrome/browser/android/thin_webview/internal/jni_headers/CompositorViewImpl_jni.h"
#include "components/thin_webview/internal/jni_headers/CompositorViewImpl_jni.h"
#include "content/public/browser/android/compositor.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/android/window_android.h"
......
......@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_ANDROID_THIN_WEBVIEW_INTERNAL_COMPOSITOR_VIEW_IMPL_H_
#define CHROME_BROWSER_ANDROID_THIN_WEBVIEW_INTERNAL_COMPOSITOR_VIEW_IMPL_H_
#ifndef COMPONENTS_THIN_WEBVIEW_INTERNAL_COMPOSITOR_VIEW_IMPL_H_
#define COMPONENTS_THIN_WEBVIEW_INTERNAL_COMPOSITOR_VIEW_IMPL_H_
#include <jni.h>
......@@ -11,7 +11,7 @@
#include "base/android/scoped_java_ref.h"
#include "base/macros.h"
#include "cc/layers/layer.h"
#include "chrome/browser/android/thin_webview/compositor_view.h"
#include "components/thin_webview/compositor_view.h"
#include "content/public/browser/android/compositor_client.h"
namespace cc {
......@@ -74,4 +74,4 @@ class CompositorViewImpl : public CompositorView,
} // namespace android
} // namespace thin_webview
#endif // CHROME_BROWSER_ANDROID_THIN_WEBVIEW_INTERNAL_COMPOSITOR_VIEW_IMPL_H_
#endif // COMPONENTS_THIN_WEBVIEW_INTERNAL_COMPOSITOR_VIEW_IMPL_H_
......@@ -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.chrome.browser.thinwebview.internal;
package org.chromium.components.thinwebview.internal;
import android.content.Context;
import android.graphics.PixelFormat;
......@@ -16,8 +16,8 @@ import android.view.View;
import org.chromium.base.annotations.CalledByNative;
import org.chromium.base.annotations.JNINamespace;
import org.chromium.base.annotations.NativeMethods;
import org.chromium.chrome.browser.thinwebview.CompositorView;
import org.chromium.chrome.browser.thinwebview.ThinWebViewConstraints;
import org.chromium.components.thinwebview.CompositorView;
import org.chromium.components.thinwebview.ThinWebViewConstraints;
import org.chromium.ui.base.WindowAndroid;
/**
......
......@@ -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.chrome.browser.thinwebview.internal;
package org.chromium.components.thinwebview.internal;
import android.content.Context;
import android.view.View;
......@@ -14,10 +14,10 @@ import androidx.annotation.Nullable;
import org.chromium.base.ContextUtils;
import org.chromium.base.annotations.JNINamespace;
import org.chromium.base.annotations.NativeMethods;
import org.chromium.chrome.browser.thinwebview.CompositorView;
import org.chromium.chrome.browser.thinwebview.ThinWebView;
import org.chromium.chrome.browser.thinwebview.ThinWebViewConstraints;
import org.chromium.components.embedder_support.delegate.WebContentsDelegateAndroid;
import org.chromium.components.thinwebview.CompositorView;
import org.chromium.components.thinwebview.ThinWebView;
import org.chromium.components.thinwebview.ThinWebViewConstraints;
import org.chromium.content_public.browser.WebContents;
import org.chromium.ui.base.ActivityWindowAndroid;
import org.chromium.ui.base.WindowAndroid;
......
......@@ -2,13 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/android/thin_webview/internal/thin_webview.h"
#include "components/thin_webview/internal/thin_webview.h"
#include "base/android/jni_android.h"
#include "cc/layers/layer.h"
#include "chrome/browser/android/thin_webview/internal/jni_headers/ThinWebViewImpl_jni.h"
#include "chrome/browser/android/thin_webview/thin_webview_initializer.h"
#include "components/embedder_support/android/delegate/web_contents_delegate_android.h"
#include "components/thin_webview/internal/jni_headers/ThinWebViewImpl_jni.h"
#include "components/thin_webview/thin_webview_initializer.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/browser_controls_state.h"
......
......@@ -2,15 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_ANDROID_THIN_WEBVIEW_INTERNAL_THIN_WEBVIEW_H_
#define CHROME_BROWSER_ANDROID_THIN_WEBVIEW_INTERNAL_THIN_WEBVIEW_H_
#ifndef COMPONENTS_THIN_WEBVIEW_INTERNAL_THIN_WEBVIEW_H_
#define COMPONENTS_THIN_WEBVIEW_INTERNAL_THIN_WEBVIEW_H_
#include <jni.h>
#include "base/android/jni_android.h"
#include "base/android/scoped_java_ref.h"
#include "base/macros.h"
#include "chrome/browser/android/thin_webview/internal/compositor_view_impl.h"
#include "components/thin_webview/internal/compositor_view_impl.h"
#include "content/public/browser/web_contents.h"
#include "ui/android/window_android.h"
......@@ -63,4 +63,4 @@ class ThinWebView {
} // namespace android
} // namespace thin_webview
#endif // CHROME_BROWSER_ANDROID_THIN_WEBVIEW_INTERNAL_THIN_WEBVIEW_H_
#endif // COMPONENTS_THIN_WEBVIEW_INTERNAL_THIN_WEBVIEW_H_
......@@ -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.chrome.browser.thinwebview;
package org.chromium.components.thinwebview;
import android.view.View;
......
......@@ -2,11 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.chrome.browser.thinwebview;
package org.chromium.components.thinwebview;
import android.content.Context;
import org.chromium.chrome.browser.thinwebview.internal.CompositorViewImpl;
import org.chromium.components.thinwebview.internal.CompositorViewImpl;
import org.chromium.ui.base.WindowAndroid;
/**
......
......@@ -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.chrome.browser.thinwebview;
package org.chromium.components.thinwebview;
import android.view.View;
......
......@@ -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.chrome.browser.thinwebview;
package org.chromium.components.thinwebview;
/** Various constraints associated with the thin webview based on the usage. */
public class ThinWebViewConstraints implements Cloneable {
......
......@@ -2,11 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.chrome.browser.thinwebview;
package org.chromium.components.thinwebview;
import android.content.Context;
import org.chromium.chrome.browser.thinwebview.internal.ThinWebViewImpl;
import org.chromium.components.thinwebview.internal.ThinWebViewImpl;
/**
* Factory for creating a {@link ThinWebView}.
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/android/thin_webview/thin_webview_initializer.h"
#include "components/thin_webview/thin_webview_initializer.h"
namespace thin_webview {
namespace android {
......
......@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_ANDROID_THIN_WEBVIEW_THIN_WEBVIEW_INITIALIZER_H_
#define CHROME_BROWSER_ANDROID_THIN_WEBVIEW_THIN_WEBVIEW_INITIALIZER_H_
#ifndef COMPONENTS_THIN_WEBVIEW_THIN_WEBVIEW_INITIALIZER_H_
#define COMPONENTS_THIN_WEBVIEW_THIN_WEBVIEW_INITIALIZER_H_
#include "base/macros.h"
......@@ -32,4 +32,4 @@ class ThinWebViewInitializer {
} // namespace android
} // namespace thin_webview
#endif // CHROME_BROWSER_ANDROID_THIN_WEBVIEW_THIN_WEBVIEW_INITIALIZER_H_
#endif // COMPONENTS_THIN_WEBVIEW_THIN_WEBVIEW_INITIALIZER_H_
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