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

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

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 #include "chrome/browser/android/vr_shell/textures/ui_texture.h" 5 #include "chrome/browser/android/vr_shell/textures/ui_texture.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 58
59 void UiTexture::SetMode(ColorScheme::Mode mode) { 59 void UiTexture::SetMode(ColorScheme::Mode mode) {
60 if (mode_ == mode) 60 if (mode_ == mode)
61 return; 61 return;
62 mode_ = mode; 62 mode_ = mode;
63 OnSetMode(); 63 OnSetMode();
64 } 64 }
65 65
66 void UiTexture::OnSetMode() {} 66 void UiTexture::OnSetMode() {}
67 67
68 const ColorScheme& UiTexture::color_scheme() const {
69 return ColorScheme::GetColorScheme(mode());
70 }
71
68 std::vector<std::unique_ptr<gfx::RenderText>> UiTexture::PrepareDrawStringRect( 72 std::vector<std::unique_ptr<gfx::RenderText>> UiTexture::PrepareDrawStringRect(
69 const base::string16& text, 73 const base::string16& text,
70 const gfx::FontList& font_list, 74 const gfx::FontList& font_list,
71 SkColor color, 75 SkColor color,
72 gfx::Rect* bounds, 76 gfx::Rect* bounds,
73 UiTexture::TextAlignment text_alignment, 77 UiTexture::TextAlignment text_alignment,
74 UiTexture::WrappingBehavior wrapping_behavior) { 78 UiTexture::WrappingBehavior wrapping_behavior) {
75 DCHECK(bounds); 79 DCHECK(bounds);
76 80
77 std::vector<std::unique_ptr<gfx::RenderText>> lines; 81 std::vector<std::unique_ptr<gfx::RenderText>> lines;
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 fonts.push_back(gfx::Font(name, size)); 200 fonts.push_back(gfx::Font(name, size));
197 *font_list = gfx::FontList(fonts); 201 *font_list = gfx::FontList(fonts);
198 return true; 202 return true;
199 } 203 }
200 204
201 void UiTexture::SetForceFontFallbackFailureForTesting(bool force) { 205 void UiTexture::SetForceFontFallbackFailureForTesting(bool force) {
202 force_font_fallback_failure_for_testing_ = force; 206 force_font_fallback_failure_for_testing_ = force;
203 } 207 }
204 208
205 } // namespace vr_shell 209 } // namespace vr_shell
OLDNEW
« no previous file with comments | « chrome/browser/android/vr_shell/textures/ui_texture.h ('k') | chrome/browser/android/vr_shell/textures/url_bar_texture.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698