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

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

Issue 2906753002: VR: Setting background colors for URL bar (Closed)
Patch Set: adjust hover/click 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/url_bar_texture.h" 5 #include "chrome/browser/android/vr_shell/textures/url_bar_texture.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "cc/paint/skia_paint_canvas.h" 8 #include "cc/paint/skia_paint_canvas.h"
9 #include "components/security_state/core/security_state.h" 9 #include "components/security_state/core/security_state.h"
10 #include "ui/gfx/canvas.h" 10 #include "ui/gfx/canvas.h"
11 #include "ui/gfx/font.h" 11 #include "ui/gfx/font.h"
12 #include "ui/gfx/font_list.h" 12 #include "ui/gfx/font_list.h"
13 #include "ui/gfx/geometry/point_f.h" 13 #include "ui/gfx/geometry/point_f.h"
14 #include "ui/gfx/geometry/rect.h" 14 #include "ui/gfx/geometry/rect.h"
15 #include "ui/gfx/geometry/rect_f.h" 15 #include "ui/gfx/geometry/rect_f.h"
16 #include "ui/gfx/paint_vector_icon.h" 16 #include "ui/gfx/paint_vector_icon.h"
17 #include "ui/gfx/render_text.h" 17 #include "ui/gfx/render_text.h"
18 #include "ui/gfx/vector_icon_types.h" 18 #include "ui/gfx/vector_icon_types.h"
19 #include "ui/vector_icons/vector_icons.h" 19 #include "ui/vector_icons/vector_icons.h"
20 20
21 namespace vr_shell { 21 namespace vr_shell {
22 22
23 namespace { 23 namespace {
24 24
25 // TODO(mthiesse): These values are all wrong. The UX spec is unclear. 25 static constexpr SkColor kBackground = 0x66EBEBEB;
26 static constexpr SkColor kBackground = 0x66D6D6D6; 26 static constexpr SkColor kBackgroundHover = 0xFFEAEAEA;
27 static constexpr SkColor kBackgroundHover = 0x6EF0F0F0; 27 static constexpr SkColor kBackgroundDown = 0xFFFAFAFA;
28 static constexpr SkColor kBackgroundDown = 0x76F6F6F6;
29 static constexpr SkColor kForeground = 0xFF333333; 28 static constexpr SkColor kForeground = 0xFF333333;
30 static constexpr SkColor kSeparatorColor = 0x33000000; 29 static constexpr SkColor kSeparatorColor = 0x33000000;
31 30
32 static constexpr SkColor kInfoOutlineIconColor = 0xFF5A5A5A; 31 static constexpr SkColor kInfoOutlineIconColor = 0xFF5A5A5A;
33 static constexpr SkColor kLockIconColor = 0xFF0B8043; 32 static constexpr SkColor kLockIconColor = 0xFF0B8043;
34 static constexpr SkColor kWarningIconColor = 0xFFC73821; 33 static constexpr SkColor kWarningIconColor = 0xFFC73821;
35 34
36 static constexpr float kWidth = 0.672; 35 static constexpr float kWidth = 0.672;
37 static constexpr float kHeight = 0.088; 36 static constexpr float kHeight = 0.088;
38 static constexpr float kFontHeight = 0.027; 37 static constexpr float kFontHeight = 0.027;
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 222
224 gfx::Size UrlBarTexture::GetPreferredTextureSize(int maximum_width) const { 223 gfx::Size UrlBarTexture::GetPreferredTextureSize(int maximum_width) const {
225 return gfx::Size(maximum_width, maximum_width * kHeight / kWidth); 224 return gfx::Size(maximum_width, maximum_width * kHeight / kWidth);
226 } 225 }
227 226
228 gfx::SizeF UrlBarTexture::GetDrawnSize() const { 227 gfx::SizeF UrlBarTexture::GetDrawnSize() const {
229 return size_; 228 return size_;
230 } 229 }
231 230
232 } // namespace vr_shell 231 } // namespace vr_shell
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698