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

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

Issue 2906403002: Disable back button when stack is empty (Closed)
Patch Set: nit 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 17 matching lines...) Expand all
28 void OnHoverEnter(const gfx::PointF& position) override; 28 void OnHoverEnter(const gfx::PointF& position) override;
29 void OnHoverLeave() override; 29 void OnHoverLeave() override;
30 void OnMove(const gfx::PointF& position) override; 30 void OnMove(const gfx::PointF& position) override;
31 void OnButtonDown(const gfx::PointF& position) override; 31 void OnButtonDown(const gfx::PointF& position) override;
32 void OnButtonUp(const gfx::PointF& position) override; 32 void OnButtonUp(const gfx::PointF& position) override;
33 bool HitTest(const gfx::PointF& point) const override; 33 bool HitTest(const gfx::PointF& point) const override;
34 34
35 void OnBeginFrame(const base::TimeTicks& begin_frame_time) override; 35 void OnBeginFrame(const base::TimeTicks& begin_frame_time) override;
36 void SetEnabled(bool enabled) override; 36 void SetEnabled(bool enabled) override;
37 37
38 void SetHistoryButtonsEnabled(bool can_go_back);
38 void SetURL(const GURL& gurl); 39 void SetURL(const GURL& gurl);
39 void SetSecurityLevel(security_state::SecurityLevel level); 40 void SetSecurityLevel(security_state::SecurityLevel level);
40 void SetBackButtonCallback(const base::Callback<void()>& callback); 41 void SetBackButtonCallback(const base::Callback<void()>& callback);
41 42
42 private: 43 private:
43 void UpdateTexture() override; 44 void UpdateTexture() override;
44 UiTexture* GetTexture() const override; 45 UiTexture* GetTexture() const override;
45 void OnStateUpdated(const gfx::PointF& position); 46 void OnStateUpdated(const gfx::PointF& position);
46 47
47 std::unique_ptr<UrlBarTexture> texture_; 48 std::unique_ptr<UrlBarTexture> texture_;
48 base::Callback<void()> back_button_callback_; 49 base::Callback<void()> back_button_callback_;
49 bool enabled_ = false; 50 bool enabled_ = false;
50 bool down_ = false; 51 bool down_ = false;
51 base::TimeTicks last_begin_frame_time_; 52 base::TimeTicks last_begin_frame_time_;
52 base::TimeTicks last_update_time_; 53 base::TimeTicks last_update_time_;
53 54
54 DISALLOW_COPY_AND_ASSIGN(UrlBar); 55 DISALLOW_COPY_AND_ASSIGN(UrlBar);
55 }; 56 };
56 57
57 } // namespace vr_shell 58 } // namespace vr_shell
58 59
59 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_URL_BAR_H_ 60 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_URL_BAR_H_
OLDNEW
« no previous file with comments | « chrome/browser/android/vr_shell/textures/url_bar_texture.cc ('k') | chrome/browser/android/vr_shell/ui_elements/url_bar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698