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

Unified Diff: chrome/browser/ui/views/new_back_shortcut_bubble.cc

Issue 2065283002: Add heuristics to limit showing of new backspace UI bubble. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
Patch Set: Created 4 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/ui/views/new_back_shortcut_bubble.h ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/new_back_shortcut_bubble.cc
diff --git a/chrome/browser/ui/views/new_back_shortcut_bubble.cc b/chrome/browser/ui/views/new_back_shortcut_bubble.cc
index c43d3f46e3feee4597459bc9ccd1ece0f25df03a..c7529d26c28fbc9c46cb6cb0590d58a79aaf00b5 100644
--- a/chrome/browser/ui/views/new_back_shortcut_bubble.cc
+++ b/chrome/browser/ui/views/new_back_shortcut_bubble.cc
@@ -31,8 +31,7 @@ const int kShowDurationMs = 3800;
}
NewBackShortcutBubble::NewBackShortcutBubble(
- ExclusiveAccessBubbleViewsContext* context,
- bool forward)
+ ExclusiveAccessBubbleViewsContext* context)
: bubble_view_context_(context),
animation_(new gfx::SlideAnimation(this)),
view_(new SubtleNotificationView(nullptr)),
@@ -40,7 +39,6 @@ NewBackShortcutBubble::NewBackShortcutBubble(
bubble_view_context_->GetBubbleParentView(),
view_,
false)) {
- UpdateContent(forward);
}
NewBackShortcutBubble::~NewBackShortcutBubble() {
@@ -50,6 +48,10 @@ NewBackShortcutBubble::~NewBackShortcutBubble() {
base::MessageLoop::current()->DeleteSoon(FROM_HERE, popup_);
}
+bool NewBackShortcutBubble::IsVisible() const {
+ return popup_->IsVisible();
+}
+
void NewBackShortcutBubble::UpdateContent(bool forward) {
// Note: The key names are parameters so that we can vary by operating system
// or change the direction of the arrow as necessary (see
@@ -83,6 +85,11 @@ void NewBackShortcutBubble::UpdateContent(bool forward) {
&NewBackShortcutBubble::OnTimerElapsed);
}
+void NewBackShortcutBubble::Hide() {
+ hide_timeout_.Stop();
+ OnTimerElapsed();
+}
+
void NewBackShortcutBubble::AnimationProgressed(
const gfx::Animation* animation) {
int opacity = animation_->CurrentValueBetween(0, 255);
« no previous file with comments | « chrome/browser/ui/views/new_back_shortcut_bubble.h ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698