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

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

Issue 2817663003: Rendering text on insecure-site warnings for WebVR (Closed)
Patch Set: Measuring text to accomplish a more proper layout and positioning icons according to RTL languages Created 3 years, 8 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/vr_shell/vr_shell.h" 5 #include "chrome/browser/android/vr_shell/vr_shell.h"
6 6
7 #include <android/native_window_jni.h> 7 #include <android/native_window_jni.h>
8 8
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 if (vr_shell_enabled_) 445 if (vr_shell_enabled_)
446 html_interface_->HandleAppButtonClicked(); 446 html_interface_->HandleAppButtonClicked();
447 } 447 }
448 448
449 void VrShell::ContentPhysicalBoundsChanged(JNIEnv* env, 449 void VrShell::ContentPhysicalBoundsChanged(JNIEnv* env,
450 const JavaParamRef<jobject>& object, 450 const JavaParamRef<jobject>& object,
451 jint width, 451 jint width,
452 jint height, 452 jint height,
453 jfloat dpr) { 453 jfloat dpr) {
454 TRACE_EVENT0("gpu", "VrShell::ContentPhysicalBoundsChanged"); 454 TRACE_EVENT0("gpu", "VrShell::ContentPhysicalBoundsChanged");
455 // TODO(acondor): Set the device scale factor for font rendering on the
456 // VR Shell textures.
455 PostToGlThreadWhenReady(base::Bind(&VrShellGl::ContentPhysicalBoundsChanged, 457 PostToGlThreadWhenReady(base::Bind(&VrShellGl::ContentPhysicalBoundsChanged,
456 gl_thread_->GetVrShellGl(), width, 458 gl_thread_->GetVrShellGl(), width,
457 height)); 459 height));
458 content_compositor_->SetWindowBounds(gfx::Size(width, height)); 460 content_compositor_->SetWindowBounds(gfx::Size(width, height));
459 } 461 }
460 462
461 void VrShell::UIPhysicalBoundsChanged(JNIEnv* env, 463 void VrShell::UIPhysicalBoundsChanged(JNIEnv* env,
462 const JavaParamRef<jobject>& object, 464 const JavaParamRef<jobject>& object,
463 jint width, 465 jint width,
464 jint height, 466 jint height,
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
692 jboolean reprojected_rendering) { 694 jboolean reprojected_rendering) {
693 return reinterpret_cast<intptr_t>(new VrShell( 695 return reinterpret_cast<intptr_t>(new VrShell(
694 env, obj, reinterpret_cast<ui::WindowAndroid*>(content_window_android), 696 env, obj, reinterpret_cast<ui::WindowAndroid*>(content_window_android),
695 content::WebContents::FromJavaWebContents(ui_web_contents), 697 content::WebContents::FromJavaWebContents(ui_web_contents),
696 reinterpret_cast<ui::WindowAndroid*>(ui_window_android), for_web_vr, 698 reinterpret_cast<ui::WindowAndroid*>(ui_window_android), for_web_vr,
697 VrShellDelegate::GetNativeVrShellDelegate(env, delegate), 699 VrShellDelegate::GetNativeVrShellDelegate(env, delegate),
698 reinterpret_cast<gvr_context*>(gvr_api), reprojected_rendering)); 700 reinterpret_cast<gvr_context*>(gvr_api), reprojected_rendering));
699 } 701 }
700 702
701 } // namespace vr_shell 703 } // namespace vr_shell
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698