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

Side by Side Diff: chrome/browser/android/app_hooks.cc

Issue 2888273003: [Offline Pages] Add an observer for requests in the CCT namespace. (Closed)
Patch Set: comments. Created 3 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/android/app_hooks.h" 5 #include "chrome/browser/android/app_hooks.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "jni/AppHooks_jni.h" 8 #include "jni/AppHooks_jni.h"
9 9
10 using base::android::ScopedJavaLocalRef; 10 using base::android::ScopedJavaLocalRef;
11 11
12 namespace chrome { 12 namespace chrome {
13 namespace android { 13 namespace android {
14 14
15 AppHooks::AppHooks() = default; 15 AppHooks::AppHooks() = default;
16 16
17 AppHooks::~AppHooks() = default; 17 AppHooks::~AppHooks() = default;
18 18
19 bool AppHooks::ShouldDetectVideoFullscreen() { 19 bool AppHooks::ShouldDetectVideoFullscreen() {
20 JNIEnv* env = base::android::AttachCurrentThread(); 20 JNIEnv* env = base::android::AttachCurrentThread();
21 ScopedJavaLocalRef<jobject> app_hooks_obj = Java_AppHooks_get(env); 21 ScopedJavaLocalRef<jobject> app_hooks_obj = Java_AppHooks_get(env);
22 22
23 return Java_AppHooks_shouldDetectVideoFullscreen(env, app_hooks_obj); 23 return Java_AppHooks_shouldDetectVideoFullscreen(env, app_hooks_obj);
24 } 24 }
25 25
26 ScopedJavaLocalRef<jobject> AppHooks::GetOfflinePagesCCTRequestDoneCallback() {
27 JNIEnv* env = base::android::AttachCurrentThread();
28 ScopedJavaLocalRef<jobject> app_hooks_obj = Java_AppHooks_get(env);
29
30 return Java_AppHooks_getOfflinePagesCCTRequestDoneCallback(env,
31 app_hooks_obj);
32 }
33
26 } // namespace android 34 } // namespace android
27 } // namespace chrome 35 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/android/app_hooks.h ('k') | chrome/browser/android/offline_pages/cct_request_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698