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

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

Issue 2926643003: [VrShell] Centralize color handling and enable close button on fullscreen (Closed)
Patch Set: Created 3 years, 6 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 #include <vector> 9 #include <vector>
10 10
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 52
53 enum WrappingBehavior { 53 enum WrappingBehavior {
54 kWrappingBehaviorWrap, 54 kWrappingBehaviorWrap,
55 kWrappingBehaviorNoWrap, 55 kWrappingBehaviorNoWrap,
56 }; 56 };
57 57
58 virtual void Draw(SkCanvas* canvas, const gfx::Size& texture_size) = 0; 58 virtual void Draw(SkCanvas* canvas, const gfx::Size& texture_size) = 0;
59 59
60 virtual void OnSetMode(); 60 virtual void OnSetMode();
61 ColorScheme::Mode mode() const { return mode_; } 61 ColorScheme::Mode mode() const { return mode_; }
62 const ColorScheme& color_scheme() const;
62 63
63 // Prepares a set of RenderText objects with the given color and fonts. 64 // Prepares a set of RenderText objects with the given color and fonts.
64 // Attempts to fit the text within the provided size. |flags| specifies how 65 // Attempts to fit the text within the provided size. |flags| specifies how
65 // the text should be rendered. If multiline is requested and provided height 66 // the text should be rendered. If multiline is requested and provided height
66 // is 0, it will be set to the minimum needed to fit the whole text. If 67 // is 0, it will be set to the minimum needed to fit the whole text. If
67 // multiline is not requested and provided width is 0, it will be set to the 68 // multiline is not requested and provided width is 0, it will be set to the
68 // minimum needed to fit the whole text. 69 // minimum needed to fit the whole text.
69 static std::vector<std::unique_ptr<gfx::RenderText>> PrepareDrawStringRect( 70 static std::vector<std::unique_ptr<gfx::RenderText>> PrepareDrawStringRect(
70 const base::string16& text, 71 const base::string16& text,
71 const gfx::FontList& font_list, 72 const gfx::FontList& font_list,
(...skipping 20 matching lines...) Expand all
92 private: 93 private:
93 bool dirty_ = true; 94 bool dirty_ = true;
94 ColorScheme::Mode mode_ = ColorScheme::kModeNormal; 95 ColorScheme::Mode mode_ = ColorScheme::kModeNormal;
95 96
96 DISALLOW_COPY_AND_ASSIGN(UiTexture); 97 DISALLOW_COPY_AND_ASSIGN(UiTexture);
97 }; 98 };
98 99
99 } // namespace vr_shell 100 } // namespace vr_shell
100 101
101 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_TEXTURES_UI_TEXTURE_H_ 102 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_TEXTURES_UI_TEXTURE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698