Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(201)

Unified Diff: chrome/browser/android/app_hooks.cc

Issue 2738893002: Add flag for enabling/disabling video fullscreen detection (Closed)
Patch Set: rebased Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/android/app_hooks.h ('k') | chrome/browser/chrome_content_browser_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/app_hooks.cc
diff --git a/chrome/browser/android/app_hooks.cc b/chrome/browser/android/app_hooks.cc
new file mode 100644
index 0000000000000000000000000000000000000000..e11f428acd543f9314ce0e657a028358c971ea11
--- /dev/null
+++ b/chrome/browser/android/app_hooks.cc
@@ -0,0 +1,27 @@
+// Copyright 2017 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.
+
+#include "chrome/browser/android/app_hooks.h"
+
+#include "base/android/jni_android.h"
+#include "jni/AppHooks_jni.h"
+
+using base::android::ScopedJavaLocalRef;
+
+namespace chrome {
+namespace android {
+
+AppHooks::AppHooks() = default;
+
+AppHooks::~AppHooks() = default;
+
+bool AppHooks::ShouldDetectVideoFullscreen() {
+ JNIEnv* env = base::android::AttachCurrentThread();
+ ScopedJavaLocalRef<jobject> app_hooks_obj = Java_AppHooks_get(env);
+
+ return Java_AppHooks_shouldDetectVideoFullscreen(env, app_hooks_obj);
+}
+
+} // namespace android
+} // namespace chrome
« no previous file with comments | « chrome/browser/android/app_hooks.h ('k') | chrome/browser/chrome_content_browser_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698