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

Side by Side Diff: content/browser/web_contents/web_contents_android.cc

Issue 789533002: Fullscreen: make fullscreen requests come from RenderFrame (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: make try happy Created 5 years, 11 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/web_contents/web_contents_android.h" 5 #include "content/browser/web_contents/web_contents_android.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_string.h" 8 #include "base/android/jni_string.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/json/json_writer.h" 10 #include "base/json/json_writer.h"
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 } 316 }
317 317
318 jboolean WebContentsAndroid::IsRenderWidgetHostViewReady( 318 jboolean WebContentsAndroid::IsRenderWidgetHostViewReady(
319 JNIEnv* env, 319 JNIEnv* env,
320 jobject obj) { 320 jobject obj) {
321 RenderWidgetHostViewAndroid* view = GetRenderWidgetHostViewAndroid(); 321 RenderWidgetHostViewAndroid* view = GetRenderWidgetHostViewAndroid();
322 return view && view->HasValidFrame(); 322 return view && view->HasValidFrame();
323 } 323 }
324 324
325 void WebContentsAndroid::ExitFullscreen(JNIEnv* env, jobject obj) { 325 void WebContentsAndroid::ExitFullscreen(JNIEnv* env, jobject obj) {
326 RenderViewHost* host = web_contents_->GetRenderViewHost(); 326 web_contents_->ExitFullscreen();
327 if (!host)
328 return;
329 host->ExitFullscreen();
330 } 327 }
331 328
332 void WebContentsAndroid::UpdateTopControlsState( 329 void WebContentsAndroid::UpdateTopControlsState(
333 JNIEnv* env, 330 JNIEnv* env,
334 jobject obj, 331 jobject obj,
335 bool enable_hiding, 332 bool enable_hiding,
336 bool enable_showing, 333 bool enable_showing,
337 bool animate) { 334 bool animate) {
338 RenderViewHost* host = web_contents_->GetRenderViewHost(); 335 RenderViewHost* host = web_contents_->GetRenderViewHost();
339 if (!host) 336 if (!host)
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 ScopedJavaGlobalRef<jobject> j_callback; 444 ScopedJavaGlobalRef<jobject> j_callback;
448 j_callback.Reset(env, callback); 445 j_callback.Reset(env, callback);
449 content::RenderFrameHost::JavaScriptResultCallback js_callback = 446 content::RenderFrameHost::JavaScriptResultCallback js_callback =
450 base::Bind(&JavaScriptResultCallback, j_callback); 447 base::Bind(&JavaScriptResultCallback, j_callback);
451 448
452 web_contents_->GetMainFrame()->ExecuteJavaScript( 449 web_contents_->GetMainFrame()->ExecuteJavaScript(
453 ConvertJavaStringToUTF16(env, script), js_callback); 450 ConvertJavaStringToUTF16(env, script), js_callback);
454 } 451 }
455 452
456 } // namespace content 453 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_impl.h ('k') | content/browser/web_contents/web_contents_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698