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

Unified Diff: ash/shelf/shelf_tooltip_manager.h

Issue 1828133004: Refine ash shelf tooltip closing on non-mash ChromeOS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Avoid WillDeleteShelf in PrepareForShutdown; use aura::WindowObserver instead. Created 4 years, 9 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 | « no previous file | ash/shelf/shelf_tooltip_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shelf/shelf_tooltip_manager.h
diff --git a/ash/shelf/shelf_tooltip_manager.h b/ash/shelf/shelf_tooltip_manager.h
index 67682577ae66bc3ef19e7501fd0d63712248a357..bd508e9c1e0b2cbe91cd7283cfcb0d46bc5ccd9d 100644
--- a/ash/shelf/shelf_tooltip_manager.h
+++ b/ash/shelf/shelf_tooltip_manager.h
@@ -11,6 +11,7 @@
#include "base/memory/weak_ptr.h"
#include "base/strings/string16.h"
#include "base/timer/timer.h"
+#include "ui/aura/window_observer.h"
#include "ui/events/event_handler.h"
namespace views {
@@ -29,6 +30,7 @@ class ShelfViewTest;
// ShelfTooltipManager manages the tooltip bubble that appears for shelf items.
class ASH_EXPORT ShelfTooltipManager : public ui::EventHandler,
+ public aura::WindowObserver,
public ShelfLayoutManagerObserver {
public:
explicit ShelfTooltipManager(ShelfView* shelf_view);
@@ -57,6 +59,9 @@ class ASH_EXPORT ShelfTooltipManager : public ui::EventHandler,
// ui::EventHandler overrides:
void OnEvent(ui::Event* event) override;
+ // aura::WindowObserver overrides:
+ void OnWindowDestroying(aura::Window* window) override;
+
// ShelfLayoutManagerObserver overrides:
void WillDeleteShelf() override;
void WillChangeVisibilityState(ShelfVisibilityState new_state) override;
@@ -71,6 +76,7 @@ class ASH_EXPORT ShelfTooltipManager : public ui::EventHandler,
base::OneShotTimer timer_;
ShelfView* shelf_view_;
+ aura::Window* root_window_;
ShelfLayoutManager* shelf_layout_manager_;
views::BubbleDelegateView* bubble_;
« no previous file with comments | « no previous file | ash/shelf/shelf_tooltip_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698