Skip to content

Commit

Permalink
Adjust JNI namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
simoarpe committed Dec 17, 2024
1 parent 2c21d51 commit 88550ed
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
/**
* @noinspection unused
*/
@JNINamespace("chrome::android")
@JNINamespace("youtube_script_injector")
public class BackgroundVideoPlaybackTabHelper {
private static final String TAG = "BackgroundVideoPlaybackTabHelper";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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<jobject>& jweb_contents) {
Expand Down Expand Up @@ -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

0 comments on commit 88550ed

Please sign in to comment.