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

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

Issue 2902043005: [vr] Add incognito coloring (Closed)
Patch Set: rebase 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 #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 21 matching lines...) Expand all
32 gfx::SizeF GetDrawnSize() const override; 32 gfx::SizeF GetDrawnSize() const override;
33 33
34 void SetURL(const GURL& gurl); 34 void SetURL(const GURL& gurl);
35 void SetSecurityLevel(int level); 35 void SetSecurityLevel(int level);
36 36
37 bool HitsBackButton(const gfx::PointF& position) const; 37 bool HitsBackButton(const gfx::PointF& position) const;
38 bool HitsUrlBar(const gfx::PointF& position) const; 38 bool HitsUrlBar(const gfx::PointF& position) const;
39 39
40 void SetHovered(bool hovered); 40 void SetHovered(bool hovered);
41 void SetPressed(bool pressed); 41 void SetPressed(bool pressed);
42 void SetIncognito(bool incognito);
42 43
43 private: 44 private:
44 void Draw(SkCanvas* canvas, const gfx::Size& texture_size) override; 45 void Draw(SkCanvas* canvas, const gfx::Size& texture_size) override;
45 float ToPixels(float meters) const; 46 float ToPixels(float meters) const;
46 bool HitsTransparentRegion(const gfx::PointF& meters, bool left) const; 47 bool HitsTransparentRegion(const gfx::PointF& meters, bool left) const;
48 SkColor AdjustColorForIncognito(SkColor c) const;
47 49
48 gfx::SizeF size_; 50 gfx::SizeF size_;
49 int security_level_; 51 int security_level_;
50 bool hovered_ = false; 52 bool hovered_ = false;
51 bool pressed_ = false; 53 bool pressed_ = false;
54 bool incognito_ = false;
52 GURL gurl_; 55 GURL gurl_;
53 GURL last_drawn_gurl_; 56 GURL last_drawn_gurl_;
54 std::vector<std::unique_ptr<gfx::RenderText>> gurl_render_texts_; 57 std::vector<std::unique_ptr<gfx::RenderText>> gurl_render_texts_;
55 58
56 DISALLOW_COPY_AND_ASSIGN(UrlBarTexture); 59 DISALLOW_COPY_AND_ASSIGN(UrlBarTexture);
57 }; 60 };
58 61
59 } // namespace vr_shell 62 } // namespace vr_shell
60 63
61 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_TEXTURES_URL_BAR_TEXTURE_H_ 64 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_TEXTURES_URL_BAR_TEXTURE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698