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

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

Issue 2885433003: VR: Implement Omnibox input targeting. (Closed)
Patch Set: 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 #include "chrome/browser/android/vr_shell/textures/loading_indicator_texture.h" 5 #include "chrome/browser/android/vr_shell/textures/loading_indicator_texture.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "cc/paint/skia_paint_canvas.h" 8 #include "cc/paint/skia_paint_canvas.h"
9 #include "third_party/skia/include/core/SkCanvas.h" 9 #include "third_party/skia/include/core/SkCanvas.h"
10 #include "third_party/skia/include/core/SkColor.h" 10 #include "third_party/skia/include/core/SkColor.h"
11 11
12 namespace vr_shell { 12 namespace vr_shell {
13 13
14 namespace { 14 namespace {
15 15
16 static constexpr SkColor kBackground = 0xCCAAAAAA; 16 static constexpr SkColor kBackground = 0xCCAAAAAA;
cjgrant 2017/05/16 14:07:23 Lets set these too? background: B9B9B9 foreground:
mthiesse 2017/05/16 18:11:01 I want to leave as-is for now. Will revisit once w
17 static constexpr SkColor kForeground = 0xCC444444; 17 static constexpr SkColor kForeground = 0xCC444444;
18 static constexpr float kWidth = 0.268; 18 static constexpr float kWidth = 0.24;
19 static constexpr float kHeight = 0.008; 19 static constexpr float kHeight = 0.008;
20 20
21 } // namespace 21 } // namespace
22 22
23 LoadingIndicatorTexture::LoadingIndicatorTexture() = default; 23 LoadingIndicatorTexture::LoadingIndicatorTexture() = default;
24 24
25 LoadingIndicatorTexture::~LoadingIndicatorTexture() = default; 25 LoadingIndicatorTexture::~LoadingIndicatorTexture() = default;
26 26
27 gfx::Size LoadingIndicatorTexture::GetPreferredTextureSize( 27 gfx::Size LoadingIndicatorTexture::GetPreferredTextureSize(
28 int maximum_width) const { 28 int maximum_width) const {
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 paint.setColor(kForeground); 66 paint.setColor(kForeground);
67 float progress_width = kHeight + (kWidth - kHeight) * progress_; 67 float progress_width = kHeight + (kWidth - kHeight) * progress_;
68 canvas->drawRoundRect({0, 0, progress_width, kHeight}, kHeight / 2, 68 canvas->drawRoundRect({0, 0, progress_width, kHeight}, kHeight / 2,
69 kHeight / 2, paint); 69 kHeight / 2, paint);
70 } 70 }
71 71
72 canvas->restore(); 72 canvas->restore();
73 } 73 }
74 74
75 } // namespace vr_shell 75 } // namespace vr_shell
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698