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

Unified Diff: chrome/browser/android/vr_shell/textures/ui_texture.h

Issue 2834543006: Hook up insecure content warnings for http webVR presentation. (Closed)
Patch Set: rebase 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/textures/ui_texture.h
diff --git a/chrome/browser/android/vr_shell/textures/ui_texture.h b/chrome/browser/android/vr_shell/textures/ui_texture.h
index ea96cb83140a33885eaa354faad9694969d12734..e619c430b0c73645fa6791819affe20034f41d4c 100644
--- a/chrome/browser/android/vr_shell/textures/ui_texture.h
+++ b/chrome/browser/android/vr_shell/textures/ui_texture.h
@@ -8,8 +8,10 @@
#include <memory>
#include "base/strings/string16.h"
-#include "third_party/skia/include/core/SkSurface.h"
#include "ui/gfx/geometry/size.h"
+#include "ui/gfx/geometry/size_f.h"
+
+class SkCanvas;
namespace gfx {
class Canvas;
@@ -18,25 +20,20 @@ class FontList;
namespace vr_shell {
-class UITexture {
+class UiTexture {
public:
- UITexture(int texture_handle, int texture_size);
- virtual ~UITexture();
+ UiTexture();
+ virtual ~UiTexture();
- void DrawAndLayout();
- void Flush();
- gfx::Size size() const { return size_; }
+ void DrawAndLayout(SkCanvas* canvas, const gfx::Size& texture_size);
+ virtual gfx::Size GetPreferredTextureSize(int maximum_width) const = 0;
+ virtual gfx::SizeF GetDrawnSize() const = 0;
protected:
- virtual void Draw(gfx::Canvas* canvas) = 0;
- virtual void SetSize() = 0;
+ virtual void Draw(gfx::Canvas* canvas, const gfx::Size& texture_size) = 0;
+
static bool IsRTL();
static gfx::FontList GetFontList(int size, base::string16 text);
-
- int texture_handle_;
- int texture_size_;
- gfx::Size size_;
- sk_sp<SkSurface> surface_;
};
} // namespace vr_shell

Powered by Google App Engine
This is Rietveld 408576698