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

Unified Diff: chrome/browser/android/vr_shell/ui_elements/url_bar.cc

Issue 2924593002: VR: Use system back button behaviour while in ChromeTabbedActivity. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/android/vr_shell/ui_elements/url_bar.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/vr_shell/ui_elements/url_bar.cc
diff --git a/chrome/browser/android/vr_shell/ui_elements/url_bar.cc b/chrome/browser/android/vr_shell/ui_elements/url_bar.cc
index 72dcf1c081b9628a2aace64da7ef94d1d12c7797..34ab35382876eac9b62a4b50d5d6972f568548c7 100644
--- a/chrome/browser/android/vr_shell/ui_elements/url_bar.cc
+++ b/chrome/browser/android/vr_shell/ui_elements/url_bar.cc
@@ -57,7 +57,7 @@ void UrlBar::OnButtonDown(const gfx::PointF& position) {
void UrlBar::OnButtonUp(const gfx::PointF& position) {
down_ = false;
OnStateUpdated(position);
- if (texture_->HitsBackButton(position))
+ if (can_go_back_ && texture_->HitsBackButton(position))
back_button_callback_.Run();
}
@@ -84,7 +84,8 @@ void UrlBar::SetURL(const GURL& gurl) {
}
void UrlBar::SetHistoryButtonsEnabled(bool can_go_back) {
- texture_->SetHistoryButtonsEnabled(can_go_back);
+ can_go_back_ = can_go_back;
+ texture_->SetHistoryButtonsEnabled(can_go_back_);
}
void UrlBar::SetSecurityLevel(security_state::SecurityLevel level) {
« no previous file with comments | « chrome/browser/android/vr_shell/ui_elements/url_bar.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698