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

Unified Diff: chrome/browser/android/vr_shell/ui_scene_manager.cc

Issue 2829653003: PROTOTYPE (incomplete): Add quad renderer and stub bits to handle security warnings. (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/android/vr_shell/ui_scene_manager.cc
diff --git a/chrome/browser/android/vr_shell/ui_scene_manager.cc b/chrome/browser/android/vr_shell/ui_scene_manager.cc
index dfd3fa6e8f07eca712bdc435abe97e3976aec987..b92d8dc20396215e866101209840174f2c13a461 100644
--- a/chrome/browser/android/vr_shell/ui_scene_manager.cc
+++ b/chrome/browser/android/vr_shell/ui_scene_manager.cc
@@ -5,6 +5,8 @@
#include "chrome/browser/android/vr_shell/ui_scene_manager.h"
#include "base/memory/ptr_util.h"
+#include "chrome/browser/android/vr_shell/textured_element.h"
+#include "chrome/browser/android/vr_shell/textures/ui_texture.h"
#include "chrome/browser/android/vr_shell/ui_element.h"
#include "chrome/browser/android/vr_shell/ui_scene.h"
@@ -12,6 +14,31 @@ namespace vr_shell {
namespace {
+class SecurityWarning : public TexturedElement {
cjgrant 2017/04/19 16:24:52 Temporary home - these shouldn't be in this file.
+ public:
+ SecurityWarning() {
+ //glGenTextures(1, &texture_id_);
+ //texture_ = base::make_unique<InsecureContentPermanentTexture>(texture_id, 1);
+
+ // Draw the texture once since it does not change.
+ //texture_->Draw();
cjgrant 2017/04/19 16:24:52 I figure drawing the one-off textures in the const
+ }
+
+ ~SecurityWarning() override {}
+
+ bool Render(VrShellRenderer* renderer) const override {
+ // Use the Skia quad renderer.
+ return true;
+ }
+
+ private:
+
+ //unsigned int texture_id_;
cjgrant 2017/04/19 16:24:52 FTR, I don't think this should in any way be alloc
+ //std::unique_ptr<UITexture> texture_;
+
+ DISALLOW_COPY_AND_ASSIGN(SecurityWarning);
+};
+
static constexpr int kWarningTimeoutSeconds = 30;
static constexpr float kWarningDistance = 0.7;
static constexpr float kWarningAngleRadians = 16.3 * M_PI / 180.0;

Powered by Google App Engine
This is Rietveld 408576698