From 88550ed0a51b65fd23fea19c59f1fbc86dcc72f9 Mon Sep 17 00:00:00 2001 From: Simone Arpe Date: Tue, 17 Dec 2024 16:01:50 +0100 Subject: [PATCH] Adjust JNI namespace --- .../browser/BackgroundVideoPlaybackTabHelper.java | 2 +- .../browser/content/youtube_tab_helper.cc | 13 ++++--------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/android/java/org/chromium/chrome/browser/BackgroundVideoPlaybackTabHelper.java b/android/java/org/chromium/chrome/browser/BackgroundVideoPlaybackTabHelper.java index 6feaef6fb0ee..66c525dff039 100644 --- a/android/java/org/chromium/chrome/browser/BackgroundVideoPlaybackTabHelper.java +++ b/android/java/org/chromium/chrome/browser/BackgroundVideoPlaybackTabHelper.java @@ -16,7 +16,7 @@ /** * @noinspection unused */ -@JNINamespace("chrome::android") +@JNINamespace("youtube_script_injector") public class BackgroundVideoPlaybackTabHelper { private static final String TAG = "BackgroundVideoPlaybackTabHelper"; diff --git a/components/youtube_script_injector/browser/content/youtube_tab_helper.cc b/components/youtube_script_injector/browser/content/youtube_tab_helper.cc index dd424090e43f..e2af3a022030 100644 --- a/components/youtube_script_injector/browser/content/youtube_tab_helper.cc +++ b/components/youtube_script_injector/browser/content/youtube_tab_helper.cc @@ -116,7 +116,7 @@ void YouTubeTabHelper::DidFinishNavigation( void YouTubeTabHelper::DidToggleFullscreenModeForTab(bool entered_fullscreen, bool /*is_user_initiated*/) { JNIEnv* env = base::android::AttachCurrentThread(); - chrome::android::Java_BackgroundVideoPlaybackTabHelper_showYouTubeFeaturesLayout(env, !entered_fullscreen); + Java_BackgroundVideoPlaybackTabHelper_showYouTubeFeaturesLayout(env, !entered_fullscreen); } void YouTubeTabHelper::MediaStartedPlaying( @@ -145,12 +145,6 @@ void YouTubeTabHelper::MediaStoppedPlaying( // return true; // } -WEB_CONTENTS_USER_DATA_KEY_IMPL(YouTubeTabHelper); -} // namespace youtube_script_injector - -namespace chrome { -namespace android { - void JNI_BackgroundVideoPlaybackTabHelper_SetFullscreen( JNIEnv* env, const base::android::JavaParamRef& jweb_contents) { @@ -188,5 +182,6 @@ jboolean JNI_BackgroundVideoPlaybackTabHelper_IsPlayingMedia( youtube_script_injector::YouTubeTabHelper::FromWebContents(web_contents); return helper ? helper->IsMediaPlaying() : false; } -} // namespace android -} // namespace chrome + +WEB_CONTENTS_USER_DATA_KEY_IMPL(YouTubeTabHelper); +} // namespace youtube_script_injector