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

Side by Side Diff: chrome/browser/android/vr_shell/ui_elements/url_bar.h

Issue 2946523002: VR: Support security chip text on URL bar. (Closed)
Patch Set: Address comments. 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_UI_ELEMENTS_URL_BAR_H_ 5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_URL_BAR_H_
6 #define CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_URL_BAR_H_ 6 #define CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_URL_BAR_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 21 matching lines...) Expand all
32 void OnMove(const gfx::PointF& position) override; 32 void OnMove(const gfx::PointF& position) override;
33 void OnButtonDown(const gfx::PointF& position) override; 33 void OnButtonDown(const gfx::PointF& position) override;
34 void OnButtonUp(const gfx::PointF& position) override; 34 void OnButtonUp(const gfx::PointF& position) override;
35 bool HitTest(const gfx::PointF& point) const override; 35 bool HitTest(const gfx::PointF& point) const override;
36 36
37 void OnBeginFrame(const base::TimeTicks& begin_frame_time) override; 37 void OnBeginFrame(const base::TimeTicks& begin_frame_time) override;
38 void SetEnabled(bool enabled) override; 38 void SetEnabled(bool enabled) override;
39 39
40 void SetHistoryButtonsEnabled(bool can_go_back); 40 void SetHistoryButtonsEnabled(bool can_go_back);
41 void SetURL(const GURL& gurl); 41 void SetURL(const GURL& gurl);
42 void SetSecurityLevel(security_state::SecurityLevel level); 42 void SetSecurityInfo(security_state::SecurityLevel level, bool malware);
43 43
44 private: 44 private:
45 void UpdateTexture() override; 45 void UpdateTexture() override;
46 UiTexture* GetTexture() const override; 46 UiTexture* GetTexture() const override;
47 void OnStateUpdated(const gfx::PointF& position); 47 void OnStateUpdated(const gfx::PointF& position);
48 48
49 std::unique_ptr<UrlBarTexture> texture_; 49 std::unique_ptr<UrlBarTexture> texture_;
50 base::Callback<void()> back_button_callback_; 50 base::Callback<void()> back_button_callback_;
51 base::Callback<void()> security_icon_callback_; 51 base::Callback<void()> security_icon_callback_;
52 bool enabled_ = false; 52 bool enabled_ = false;
53 bool can_go_back_ = false; 53 bool can_go_back_ = false;
54 bool down_ = false; 54 bool down_ = false;
55 bool security_icon_down_ = false; 55 bool security_region_down_ = false;
56 base::TimeTicks last_begin_frame_time_; 56 base::TimeTicks last_begin_frame_time_;
57 base::TimeTicks last_update_time_; 57 base::TimeTicks last_update_time_;
58 58
59 DISALLOW_COPY_AND_ASSIGN(UrlBar); 59 DISALLOW_COPY_AND_ASSIGN(UrlBar);
60 }; 60 };
61 61
62 } // namespace vr_shell 62 } // namespace vr_shell
63 63
64 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_URL_BAR_H_ 64 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_URL_BAR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698