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

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: Fix alphabetical order in chrome_browser_ui.gypi. 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
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.h ('k') | chrome/browser/ui/views/new_back_shortcut_bubble.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 5be5b95280c0da1d5cc8d380374d1497212aa71b..32f49a7d8e05b98945e1a8b05dbf64b67f2b9775 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -82,6 +82,7 @@
#include "chrome/browser/ui/views/location_bar/location_bar_view.h"
#include "chrome/browser/ui/views/location_bar/location_icon_view.h"
#include "chrome/browser/ui/views/location_bar/zoom_bubble_view.h"
+#include "chrome/browser/ui/views/new_back_shortcut_bubble.h"
#include "chrome/browser/ui/views/omnibox/omnibox_view_views.h"
#include "chrome/browser/ui/views/profiles/avatar_menu_button.h"
#include "chrome/browser/ui/views/profiles/profile_chooser_view.h"
@@ -978,7 +979,13 @@ 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.
+ new_back_shortcut_bubble_.reset();
+
+ if (exclusive_access_bubble_) {
exclusive_access_bubble_->UpdateContent(url, bubble_type);
} else {
exclusive_access_bubble_.reset(
@@ -1007,6 +1014,16 @@ bool BrowserView::IsFullscreenBubbleVisible() const {
return exclusive_access_bubble_ != nullptr;
}
+void BrowserView::ShowNewBackShortcutBubble(bool forward) {
+ // Hide the exclusive access bubble, to avoid overlapping.
+ exclusive_access_bubble_.reset();
+
+ if (new_back_shortcut_bubble_)
+ new_back_shortcut_bubble_->UpdateContent(forward);
+ else
+ new_back_shortcut_bubble_.reset(new NewBackShortcutBubble(this, forward));
+}
+
void BrowserView::RestoreFocus() {
WebContents* selected_web_contents = GetActiveWebContents();
if (selected_web_contents)
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.h ('k') | chrome/browser/ui/views/new_back_shortcut_bubble.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698