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

Side by Side Diff: android_webview/native/aw_web_contents_delegate.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "android_webview/native/aw_web_contents_delegate.h" 5 #include "android_webview/native/aw_web_contents_delegate.h"
6 6
7 #include "android_webview/browser/aw_javascript_dialog_manager.h" 7 #include "android_webview/browser/aw_javascript_dialog_manager.h"
8 #include "android_webview/browser/find_helper.h" 8 #include "android_webview/browser/find_helper.h"
9 #include "android_webview/native/aw_contents.h" 9 #include "android_webview/native/aw_contents.h"
10 #include "android_webview/native/aw_contents_io_thread_client_impl.h" 10 #include "android_webview/native/aw_contents_io_thread_client_impl.h"
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 content::MEDIA_DEVICE_FAILED_DUE_TO_SHUTDOWN, 202 content::MEDIA_DEVICE_FAILED_DUE_TO_SHUTDOWN,
203 scoped_ptr<content::MediaStreamUI>().Pass()); 203 scoped_ptr<content::MediaStreamUI>().Pass());
204 return; 204 return;
205 } 205 }
206 aw_contents->GetPermissionRequestHandler()->SendRequest( 206 aw_contents->GetPermissionRequestHandler()->SendRequest(
207 scoped_ptr<AwPermissionRequestDelegate>( 207 scoped_ptr<AwPermissionRequestDelegate>(
208 new MediaAccessPermissionRequest(request, callback))); 208 new MediaAccessPermissionRequest(request, callback)));
209 } 209 }
210 210
211 void AwWebContentsDelegate::ToggleFullscreenModeForTab( 211 void AwWebContentsDelegate::ToggleFullscreenModeForTab(
212 content::WebContents* web_contents, bool enter_fullscreen) { 212 content::WebContents* web_contents, bool enter_fullscreen, bool is_video) {
213 JNIEnv* env = AttachCurrentThread(); 213 JNIEnv* env = AttachCurrentThread();
214 214
215 ScopedJavaLocalRef<jobject> java_delegate = GetJavaDelegate(env); 215 ScopedJavaLocalRef<jobject> java_delegate = GetJavaDelegate(env);
216 if (java_delegate.obj()) { 216 if (java_delegate.obj()) {
217 Java_AwWebContentsDelegate_toggleFullscreenModeForTab( 217 Java_AwWebContentsDelegate_toggleFullscreenModeForTab(
218 env, java_delegate.obj(), enter_fullscreen); 218 env, java_delegate.obj(), enter_fullscreen, is_video);
219 } 219 }
220 is_fullscreen_ = enter_fullscreen; 220 is_fullscreen_ = enter_fullscreen;
221 web_contents->GetRenderViewHost()->WasResized(); 221 web_contents->GetRenderViewHost()->WasResized();
222 } 222 }
223 223
224 bool AwWebContentsDelegate::IsFullscreenForTabOrPending( 224 bool AwWebContentsDelegate::IsFullscreenForTabOrPending(
225 const content::WebContents* web_contents) const { 225 const content::WebContents* web_contents) const {
226 return is_fullscreen_; 226 return is_fullscreen_;
227 } 227 }
228 228
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 DVLOG(0) << "File Chooser result: mode = " << mode 266 DVLOG(0) << "File Chooser result: mode = " << mode
267 << ", file paths = " << JoinString(file_path_str, ":"); 267 << ", file paths = " << JoinString(file_path_str, ":");
268 rvh->FilesSelectedInChooser(files, mode); 268 rvh->FilesSelectedInChooser(files, mode);
269 } 269 }
270 270
271 bool RegisterAwWebContentsDelegate(JNIEnv* env) { 271 bool RegisterAwWebContentsDelegate(JNIEnv* env) {
272 return RegisterNativesImpl(env); 272 return RegisterNativesImpl(env);
273 } 273 }
274 274
275 } // namespace android_webview 275 } // namespace android_webview
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698