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

Unified Diff: chrome/browser/android/vr_shell/textured_element.h

Issue 2834543006: Hook up insecure content warnings for http webVR presentation. (Closed)
Patch Set: Add missing files 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/textured_element.h
diff --git a/chrome/browser/android/vr_shell/textured_element.h b/chrome/browser/android/vr_shell/textured_element.h
new file mode 100644
index 0000000000000000000000000000000000000000..86cc67a75fbd62324f181d47186351550cc8e354
--- /dev/null
+++ b/chrome/browser/android/vr_shell/textured_element.h
@@ -0,0 +1,43 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_ANDROID_VR_SHELL_TEXTURED_ELEMENT_H_
+#define CHROME_BROWSER_ANDROID_VR_SHELL_TEXTURED_ELEMENT_H_
+
+#include "base/macros.h"
+#include "chrome/browser/android/vr_shell/ui_element.h"
+
+class SkSurface;
+
+namespace vr_shell {
+
+class UITexture;
cjgrant 2017/04/21 14:30:13 Should we rename this UiTexture to match UiElement
mthiesse 2017/04/21 15:05:12 Done.
+
+class TexturedElement : public UiElement {
+ public:
+ explicit TexturedElement(int preferred_width);
cjgrant 2017/04/21 14:30:13 An element width is in meters; I think the paramet
mthiesse 2017/04/21 15:05:11 Done.
+ ~TexturedElement() override;
+
+ void Initialize() override;
+
+ // UiElement interface.
+ void Render(VrShellRenderer* renderer,
+ vr::Mat4f view_proj_matrix) const override;
+
+ protected:
+ virtual UITexture* GetTexture() const = 0;
+
+ private:
+ void Flush(SkSurface* surface);
+
+ gfx::Size size_;
acondor_ 2017/04/21 15:04:23 texture_size_ so that it's not confused with UIEle
mthiesse 2017/04/21 17:17:30 Done.
+ unsigned int texture_handle_;
cjgrant 2017/04/21 14:30:13 Possibly GLuint for clarity? This is what glGenTe
mthiesse 2017/04/21 15:05:11 Done.
+ int preferred_width_;
+
+ DISALLOW_COPY_AND_ASSIGN(TexturedElement);
+};
+
+} // namespace vr_shell
+
+#endif // CHROME_BROWSER_ANDROID_VR_SHELL_TEXTURED_ELEMENT_H_

Powered by Google App Engine
This is Rietveld 408576698