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

Side by Side Diff: chrome/browser/android/vr_shell/textures/ui_texture.h

Issue 2862283002: VR: Add initial URL bar element and texture. (Closed)
Patch Set: Drop anti-aliasing. Created 3 years, 7 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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_TEXTURES_UI_TEXTURE_H_ 5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_TEXTURES_UI_TEXTURE_H_
6 #define CHROME_BROWSER_ANDROID_VR_SHELL_TEXTURES_UI_TEXTURE_H_ 6 #define CHROME_BROWSER_ANDROID_VR_SHELL_TEXTURES_UI_TEXTURE_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
11 #include "ui/gfx/geometry/size.h" 11 #include "ui/gfx/geometry/size.h"
12 #include "ui/gfx/geometry/size_f.h" 12 #include "ui/gfx/geometry/size_f.h"
13 13
14 class SkCanvas; 14 class SkCanvas;
15 15
16 namespace gfx { 16 namespace gfx {
17 class Canvas;
18 class FontList; 17 class FontList;
19 } // namespace gfx 18 } // namespace gfx
20 19
21 namespace vr_shell { 20 namespace vr_shell {
22 21
23 class UiTexture { 22 class UiTexture {
24 public: 23 public:
25 UiTexture(); 24 UiTexture();
26 virtual ~UiTexture(); 25 virtual ~UiTexture();
27 26
28 void DrawAndLayout(SkCanvas* canvas, const gfx::Size& texture_size); 27 void DrawAndLayout(SkCanvas* canvas, const gfx::Size& texture_size);
29 virtual gfx::Size GetPreferredTextureSize(int maximum_width) const = 0; 28 virtual gfx::Size GetPreferredTextureSize(int maximum_width) const = 0;
30 virtual gfx::SizeF GetDrawnSize() const = 0; 29 virtual gfx::SizeF GetDrawnSize() const = 0;
31 30
32 protected: 31 protected:
33 virtual void Draw(gfx::Canvas* canvas, const gfx::Size& texture_size) = 0; 32 virtual void Draw(SkCanvas* canvas, const gfx::Size& texture_size) = 0;
34 33
35 static bool IsRTL(); 34 static bool IsRTL();
35 static gfx::FontList GetDefaultFontList(int size);
36 static gfx::FontList GetFontList(int size, base::string16 text); 36 static gfx::FontList GetFontList(int size, base::string16 text);
37 }; 37 };
38 38
39 } // namespace vr_shell 39 } // namespace vr_shell
40 40
41 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_TEXTURES_UI_TEXTURE_H_ 41 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_TEXTURES_UI_TEXTURE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698