| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_TEXTURES_LOADING_INDICATOR_TEXTURE_H_ |
| 6 #define CHROME_BROWSER_ANDROID_VR_SHELL_TEXTURES_LOADING_INDICATOR_TEXTURE_H_ |
| 7 |
| 8 #include "chrome/browser/android/vr_shell/textures/ui_texture.h" |
| 9 #include "ui/gfx/geometry/size.h" |
| 10 |
| 11 class SkCanvas; |
| 12 |
| 13 namespace vr_shell { |
| 14 |
| 15 class LoadingIndicatorTexture : public UiTexture { |
| 16 public: |
| 17 LoadingIndicatorTexture(); |
| 18 ~LoadingIndicatorTexture() override; |
| 19 gfx::Size GetPreferredTextureSize(int width) const override; |
| 20 gfx::SizeF GetDrawnSize() const override; |
| 21 |
| 22 void SetLoading(bool loading); |
| 23 void SetLoadProgress(float progress); |
| 24 |
| 25 private: |
| 26 void Draw(SkCanvas* canvas, const gfx::Size& texture_size) override; |
| 27 gfx::SizeF size_; |
| 28 bool loading_ = false; |
| 29 float progress_ = 0; |
| 30 }; |
| 31 |
| 32 } // namespace vr_shell |
| 33 |
| 34 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_TEXTURES_LOADING_INDICATOR_TEXTURE_H_ |
| OLD | NEW |