| OLD | NEW |
| 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 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_TEXTURES_URL_BAR_TEXTURE_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_TEXTURES_URL_BAR_TEXTURE_H_ |
| 6 #define CHROME_BROWSER_ANDROID_VR_SHELL_TEXTURES_URL_BAR_TEXTURE_H_ | 6 #define CHROME_BROWSER_ANDROID_VR_SHELL_TEXTURES_URL_BAR_TEXTURE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 | 25 |
| 26 UrlBarTexture(); | 26 UrlBarTexture(); |
| 27 ~UrlBarTexture() override; | 27 ~UrlBarTexture() override; |
| 28 gfx::Size GetPreferredTextureSize(int width) const override; | 28 gfx::Size GetPreferredTextureSize(int width) const override; |
| 29 gfx::SizeF GetDrawnSize() const override; | 29 gfx::SizeF GetDrawnSize() const override; |
| 30 bool SetDrawFlags(int draw_flags) override; | 30 bool SetDrawFlags(int draw_flags) override; |
| 31 | 31 |
| 32 void SetURL(const GURL& gurl); | 32 void SetURL(const GURL& gurl); |
| 33 void SetSecurityLevel(int level); | 33 void SetSecurityLevel(int level); |
| 34 | 34 |
| 35 bool dirty() const { return dirty_; } | |
| 36 | |
| 37 private: | 35 private: |
| 38 void Draw(SkCanvas* canvas, const gfx::Size& texture_size) override; | 36 void Draw(SkCanvas* canvas, const gfx::Size& texture_size) override; |
| 39 float ToPixels(float meters) const; | 37 float ToPixels(float meters) const; |
| 40 | 38 |
| 41 gfx::SizeF size_; | 39 gfx::SizeF size_; |
| 42 bool dirty_ = false; | |
| 43 int security_level_; | 40 int security_level_; |
| 44 GURL gurl_; | 41 GURL gurl_; |
| 45 GURL last_drawn_gurl_; | 42 GURL last_drawn_gurl_; |
| 46 std::vector<std::unique_ptr<gfx::RenderText>> gurl_render_texts_; | 43 std::vector<std::unique_ptr<gfx::RenderText>> gurl_render_texts_; |
| 47 }; | 44 }; |
| 48 | 45 |
| 49 } // namespace vr_shell | 46 } // namespace vr_shell |
| 50 | 47 |
| 51 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_TEXTURES_URL_BAR_TEXTURE_H_ | 48 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_TEXTURES_URL_BAR_TEXTURE_H_ |
| OLD | NEW |