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

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

Issue 2926643003: [VrShell] Centralize color handling and enable close button on fullscreen (Closed)
Patch Set: 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
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 #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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 security_state::SecurityLevel security_level, 54 security_state::SecurityLevel security_level,
55 vr_shell::RenderTextWrapper* render_text, 55 vr_shell::RenderTextWrapper* render_text,
56 const ColorScheme& color_scheme); 56 const ColorScheme& color_scheme);
57 57
58 private: 58 private:
59 void Draw(SkCanvas* canvas, const gfx::Size& texture_size) override; 59 void Draw(SkCanvas* canvas, const gfx::Size& texture_size) override;
60 float ToPixels(float meters) const; 60 float ToPixels(float meters) const;
61 bool HitsTransparentRegion(const gfx::PointF& meters, bool left) const; 61 bool HitsTransparentRegion(const gfx::PointF& meters, bool left) const;
62 void RenderUrl(const gfx::Size& texture_size, const gfx::Rect& bounds); 62 void RenderUrl(const gfx::Size& texture_size, const gfx::Rect& bounds);
63 void OnSetMode() override; 63 void OnSetMode() override;
64 const ColorScheme& color_scheme() const;
65 64
66 gfx::SizeF size_; 65 gfx::SizeF size_;
67 bool hovered_ = false; 66 bool hovered_ = false;
68 bool pressed_ = false; 67 bool pressed_ = false;
69 bool can_go_back_ = false; 68 bool can_go_back_ = false;
70 69
71 GURL gurl_; 70 GURL gurl_;
72 security_state::SecurityLevel security_level_; 71 security_state::SecurityLevel security_level_;
73 72
74 std::unique_ptr<gfx::RenderText> url_render_text_; 73 std::unique_ptr<gfx::RenderText> url_render_text_;
75 GURL last_drawn_gurl_; 74 GURL last_drawn_gurl_;
76 security_state::SecurityLevel last_drawn_security_level_; 75 security_state::SecurityLevel last_drawn_security_level_;
77 base::Callback<void(UiUnsupportedMode)> failure_callback_; 76 base::Callback<void(UiUnsupportedMode)> failure_callback_;
78 77
79 DISALLOW_COPY_AND_ASSIGN(UrlBarTexture); 78 DISALLOW_COPY_AND_ASSIGN(UrlBarTexture);
80 }; 79 };
81 80
82 } // namespace vr_shell 81 } // namespace vr_shell
83 82
84 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_TEXTURES_URL_BAR_TEXTURE_H_ 83 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_TEXTURES_URL_BAR_TEXTURE_H_
OLDNEW
« no previous file with comments | « chrome/browser/android/vr_shell/textures/ui_texture.cc ('k') | chrome/browser/android/vr_shell/textures/url_bar_texture.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698