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

Unified Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 1983803002: Added notification when user presses backspace to use new shortcut. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@subtle-notification-view-refactor
Patch Set: Use UTF-16 instead of many UTF-8 conversions. Created 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/frame/browser_view.cc
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc
index 5953a8098631f2b93f929a02ce360885ef6ec670..27aaea1391ff3743eddcafeb37d9d5ce1fc75f70 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -985,12 +985,19 @@ void BrowserView::UpdateExclusiveAccessExitBubbleContent(
if (bubble_type == EXCLUSIVE_ACCESS_BUBBLE_TYPE_NONE ||
ShouldUseImmersiveFullscreenForUrl(url)) {
exclusive_access_bubble_.reset();
- } else if (exclusive_access_bubble_.get()) {
+ return;
+ }
+
+ // Hide the backspace shortcut bubble, to avoid overlapping.
+ backspace_new_shortcut_bubble_.reset();
+
+ if (exclusive_access_bubble_.get()) {
Peter Kasting 2016/05/19 10:08:37 Nit: .get() not necessary
Matt Giuca 2016/05/23 04:22:57 Done.
exclusive_access_bubble_->UpdateContent(url, bubble_type);
- } else {
- exclusive_access_bubble_.reset(
- new ExclusiveAccessBubbleViews(this, url, bubble_type));
+ return;
}
+
+ exclusive_access_bubble_.reset(
+ new ExclusiveAccessBubbleViews(this, url, bubble_type));
}
void BrowserView::OnExclusiveAccessUserInput() {
@@ -1025,6 +1032,19 @@ void BrowserView::FullscreenStateChanged() {
ProcessFullscreen(false, GURL(), EXCLUSIVE_ACCESS_BUBBLE_TYPE_NONE);
}
+void BrowserView::ShowBackspaceNewShortcutBubble(bool forward) {
Peter Kasting 2016/05/19 10:08:37 Nit: Function definition order must match the decl
Matt Giuca 2016/05/23 04:22:57 There is already significant discrepancy between t
Peter Kasting 2016/05/24 23:35:08 Yeah :( I would love to see a CL that fixes all o
+ // Hide the exclusive access bubble, to avoid overlapping.
+ exclusive_access_bubble_.reset();
+
+ if (backspace_new_shortcut_bubble_.get()) {
Peter Kasting 2016/05/19 10:08:37 Nit: .get() not necessary
Matt Giuca 2016/05/23 04:22:57 Done.
+ backspace_new_shortcut_bubble_->UpdateContent(forward);
+ return;
+ }
+
+ backspace_new_shortcut_bubble_.reset(
+ new BackspaceNewShortcutBubble(this, forward));
+}
+
LocationBar* BrowserView::GetLocationBar() const {
return GetLocationBarView();
}

Powered by Google App Engine
This is Rietveld 408576698