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

Side by Side Diff: content/browser/android/content_view_core_impl.cc

Issue 652673002: NOT FOR REVIEW: Modify ToggleFullscreenMode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fixPowerBlockerNonMedia
Patch Set: Rebase Created 6 years, 2 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 "content/browser/android/content_view_core_impl.h" 5 #include "content/browser/android/content_view_core_impl.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_array.h" 8 #include "base/android/jni_array.h"
9 #include "base/android/jni_string.h" 9 #include "base/android/jni_string.h"
10 #include "base/android/scoped_java_ref.h" 10 #include "base/android/scoped_java_ref.h"
(...skipping 1190 matching lines...) Expand 10 before | Expand all | Expand 10 after
1201 1201
1202 bool ContentViewCoreImpl::IsFullscreenRequiredForOrientationLock() const { 1202 bool ContentViewCoreImpl::IsFullscreenRequiredForOrientationLock() const {
1203 JNIEnv* env = AttachCurrentThread(); 1203 JNIEnv* env = AttachCurrentThread();
1204 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); 1204 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env);
1205 if (obj.is_null()) 1205 if (obj.is_null())
1206 return true; 1206 return true;
1207 return Java_ContentViewCore_isFullscreenRequiredForOrientationLock(env, 1207 return Java_ContentViewCore_isFullscreenRequiredForOrientationLock(env,
1208 obj.obj()); 1208 obj.obj());
1209 } 1209 }
1210 1210
1211 void ContentViewCoreImpl::OnDidEnterFullscreen() {
1212 JNIEnv* env = AttachCurrentThread();
1213 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env);
1214 if (obj.is_null())
1215 return;
1216 Java_ContentViewCore_onDidEnterFullscreen(env, obj.obj());
1217 }
1218
1219 void ContentViewCoreImpl::OnDidExitFullscreen() {
1220 JNIEnv* env = AttachCurrentThread();
1221 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env);
1222 if (obj.is_null())
1223 return;
1224 Java_ContentViewCore_onDidExitFullscreen(env, obj.obj());
1225 }
1226
1227 void ContentViewCoreImpl::SetAccessibilityEnabledInternal(bool enabled) { 1211 void ContentViewCoreImpl::SetAccessibilityEnabledInternal(bool enabled) {
1228 accessibility_enabled_ = enabled; 1212 accessibility_enabled_ = enabled;
1229 BrowserAccessibilityStateImpl* accessibility_state = 1213 BrowserAccessibilityStateImpl* accessibility_state =
1230 BrowserAccessibilityStateImpl::GetInstance(); 1214 BrowserAccessibilityStateImpl::GetInstance();
1231 if (enabled) { 1215 if (enabled) {
1232 // This enables accessibility globally unless it was explicitly disallowed 1216 // This enables accessibility globally unless it was explicitly disallowed
1233 // by a command-line flag. 1217 // by a command-line flag.
1234 accessibility_state->OnScreenReaderDetected(); 1218 accessibility_state->OnScreenReaderDetected();
1235 // If it was actually enabled globally, enable it for this RenderWidget now. 1219 // If it was actually enabled globally, enable it for this RenderWidget now.
1236 if (accessibility_state->IsAccessibleBrowser() && web_contents_) 1220 if (accessibility_state->IsAccessibleBrowser() && web_contents_)
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
1334 reinterpret_cast<ui::WindowAndroid*>(window_android), 1318 reinterpret_cast<ui::WindowAndroid*>(window_android),
1335 retained_objects_set); 1319 retained_objects_set);
1336 return reinterpret_cast<intptr_t>(view); 1320 return reinterpret_cast<intptr_t>(view);
1337 } 1321 }
1338 1322
1339 bool RegisterContentViewCore(JNIEnv* env) { 1323 bool RegisterContentViewCore(JNIEnv* env) {
1340 return RegisterNativesImpl(env); 1324 return RegisterNativesImpl(env);
1341 } 1325 }
1342 1326
1343 } // namespace content 1327 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/android/content_view_core_impl.h ('k') | content/browser/media/android/browser_media_player_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698