| 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_URL_BAR_TEXTURE_H_ |
| 6 #define CHROME_BROWSER_ANDROID_VR_SHELL_TEXTURES_URL_BAR_TEXTURE_H_ |
| 7 |
| 8 #include "chrome/browser/android/vr_shell/textures/ui_texture.h" |
| 9 |
| 10 #include "url/gurl.h" |
| 11 |
| 12 namespace vr_shell { |
| 13 |
| 14 class UrlBarTexture : public UiTexture { |
| 15 public: |
| 16 UrlBarTexture(); |
| 17 ~UrlBarTexture() override; |
| 18 gfx::Size GetPreferredTextureSize(int width) const override; |
| 19 gfx::SizeF GetDrawnSize() const override; |
| 20 |
| 21 void SetHover(bool hover); |
| 22 void SetURL(const GURL& gurl); |
| 23 |
| 24 private: |
| 25 void Draw(SkCanvas* canvas, const gfx::Size& texture_size) override; |
| 26 float ToPixels(float meters) const; |
| 27 |
| 28 gfx::SizeF size_; |
| 29 bool hover_ = false; |
| 30 GURL gurl_; |
| 31 }; |
| 32 |
| 33 } // namespace vr_shell |
| 34 |
| 35 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_TEXTURES_URL_BAR_TEXTURE_H_ |
| OLD | NEW |